<?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-6185090521451311774</id><updated>2012-02-07T21:52:38.477-08:00</updated><category term='Design Pattern'/><category term='Unity Application Block'/><category term='Dependency Injection(DI)'/><category term='jQuery'/><category term='ASP.Net'/><category term='Inversion of Control(IOC)'/><category term='WCF'/><category term='OOPS'/><category term='SQL Server'/><title type='text'>.Net Material</title><subtitle type='html'>Get frequently asked Microsoft ASP.NET, WCF, WPF, WWF, jQuery, HTML5, C#, OOPS Web services and .NET Remoting, Sql Server interview material.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>53</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-8563156866950316642</id><published>2012-02-07T21:52:00.000-08:00</published><updated>2012-02-07T21:52:38.551-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dependency Injection(DI)'/><category scheme='http://www.blogger.com/atom/ns#' term='Unity Application Block'/><category scheme='http://www.blogger.com/atom/ns#' term='Inversion of Control(IOC)'/><title type='text'>Dependency Injection</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: 12.0pt; mso-outline-level: 2;"&gt;
&lt;b&gt;&lt;i&gt;&lt;span style="font-family: Arial, sans-serif; font-size: 9pt;"&gt;Replace
dependencies with Dependency Injection to make your classes easier to reuse and
test.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;The dependency injection pattern, is one of the most popular
design paradigms today. It facilitates the design and implementation of &lt;b&gt;loosely coupled&lt;/b&gt;, &lt;b&gt;reusable&lt;/b&gt;, and &lt;b&gt;testable&lt;/b&gt;
objects in your software designs by removing dependencies that often inhibit
reuse. Dependency injection can help you design your applications so that the
architecture links the components rather than the components linking
themselves.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;Samples used for this presentation:&amp;nbsp;&lt;a href="https://docs.google.com/open?id=0B4pOov3a23U3YjIzMzE1MzctOTc1ZS00MDZmLWFkZDctNzQ1ZGYwMTcxMTRj" target="_blank"&gt;DI_Demo.zip&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-al9fc2C7bcg/TzIH1WL5tUI/AAAAAAAAAVY/RUjUqTVE18k/s1600/Slide1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://2.bp.blogspot.com/-al9fc2C7bcg/TzIH1WL5tUI/AAAAAAAAAVY/RUjUqTVE18k/s640/Slide1.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-eOqhYg5Ikx8/TzIH2lIzdWI/AAAAAAAAAVg/Eik6EVtbCP4/s1600/Slide2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://4.bp.blogspot.com/-eOqhYg5Ikx8/TzIH2lIzdWI/AAAAAAAAAVg/Eik6EVtbCP4/s640/Slide2.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-BZXVwILil_I/TzIH4CD7esI/AAAAAAAAAVo/o-PMFTGAxEE/s1600/Slide3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://4.bp.blogspot.com/-BZXVwILil_I/TzIH4CD7esI/AAAAAAAAAVo/o-PMFTGAxEE/s640/Slide3.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-XkO_SuQiV28/TzIH5sAwQuI/AAAAAAAAAVw/RW7Gh-rEZ-0/s1600/Slide4.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://3.bp.blogspot.com/-XkO_SuQiV28/TzIH5sAwQuI/AAAAAAAAAVw/RW7Gh-rEZ-0/s640/Slide4.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-anIluzNwyVY/TzIH7EN32eI/AAAAAAAAAV4/MfVrS7p9gOI/s1600/Slide5.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://4.bp.blogspot.com/-anIluzNwyVY/TzIH7EN32eI/AAAAAAAAAV4/MfVrS7p9gOI/s640/Slide5.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-7d1pmjQMBwM/TzIH9K5r8gI/AAAAAAAAAWA/JMefzkYPG38/s1600/Slide6.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://3.bp.blogspot.com/-7d1pmjQMBwM/TzIH9K5r8gI/AAAAAAAAAWA/JMefzkYPG38/s640/Slide6.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-_niHcvSI3uY/TzIH-9YVTuI/AAAAAAAAAWI/g8UrkyoEVDQ/s1600/Slide7.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://3.bp.blogspot.com/-_niHcvSI3uY/TzIH-9YVTuI/AAAAAAAAAWI/g8UrkyoEVDQ/s640/Slide7.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-uT7pfdbycA8/TzIIAOMUwuI/AAAAAAAAAWQ/fC0OkKr7htc/s1600/Slide8.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://1.bp.blogspot.com/-uT7pfdbycA8/TzIIAOMUwuI/AAAAAAAAAWQ/fC0OkKr7htc/s640/Slide8.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-T7O1ofGkqyQ/TzIIBlpX42I/AAAAAAAAAWY/JJ2PD5jQ4Hk/s1600/Slide9.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://4.bp.blogspot.com/-T7O1ofGkqyQ/TzIIBlpX42I/AAAAAAAAAWY/JJ2PD5jQ4Hk/s640/Slide9.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-iSSJg4cddfU/TzIIDqqwFtI/AAAAAAAAAWg/IZpNghJ7w60/s1600/Slide10.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://2.bp.blogspot.com/-iSSJg4cddfU/TzIIDqqwFtI/AAAAAAAAAWg/IZpNghJ7w60/s640/Slide10.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-vAJ5825YRYA/TzIIEvNSsBI/AAAAAAAAAWo/5RDBst2wfaM/s1600/Slide11.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://4.bp.blogspot.com/-vAJ5825YRYA/TzIIEvNSsBI/AAAAAAAAAWo/5RDBst2wfaM/s640/Slide11.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-WCGvB-iR8g4/TzIIGG8YMlI/AAAAAAAAAWw/IWjTXd5Typk/s1600/Slide12.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://2.bp.blogspot.com/-WCGvB-iR8g4/TzIIGG8YMlI/AAAAAAAAAWw/IWjTXd5Typk/s640/Slide12.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-VjtLlqB6Dmg/TzIIHUr2TbI/AAAAAAAAAW4/-T5nCvpCyXI/s1600/Slide13.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://4.bp.blogspot.com/-VjtLlqB6Dmg/TzIIHUr2TbI/AAAAAAAAAW4/-T5nCvpCyXI/s640/Slide13.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-XFTWc0COGN8/TzIIIRMSWQI/AAAAAAAAAXA/CsUFIGLcFUc/s1600/Slide14.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://3.bp.blogspot.com/-XFTWc0COGN8/TzIIIRMSWQI/AAAAAAAAAXA/CsUFIGLcFUc/s640/Slide14.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-8563156866950316642?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/8563156866950316642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2012/02/dependency-injection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/8563156866950316642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/8563156866950316642'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2012/02/dependency-injection.html' title='Dependency Injection'/><author><name>Rahul Shinde</name><uri>https://profiles.google.com/101471125327442213700</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-IcGTme6SFUw/AAAAAAAAAAI/AAAAAAAAAPQ/DkVOYWb-KGQ/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-al9fc2C7bcg/TzIH1WL5tUI/AAAAAAAAAVY/RUjUqTVE18k/s72-c/Slide1.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-5615203581427685448</id><published>2012-01-22T20:25:00.000-08:00</published><updated>2012-01-22T20:45:09.224-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>WCF Bindings - Overview</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/-re8GPEMvjpI/TxzjiEmXFqI/AAAAAAAAATs/JgNsM6S947A/s1600/Slide1.GIF"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://2.bp.blogspot.com/-re8GPEMvjpI/TxzjiEmXFqI/AAAAAAAAATs/JgNsM6S947A/s400/Slide1.GIF" border="0" alt="" id="BLOGGER_PHOTO_ID_5700681402833901218" /&gt;&lt;/a&gt;
&lt;a href="http://2.bp.blogspot.com/-uaQT3Mevr_k/TxzjiMmz9SI/AAAAAAAAAT4/GUDr9AufxYI/s1600/Slide2.GIF"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://2.bp.blogspot.com/-uaQT3Mevr_k/TxzjiMmz9SI/AAAAAAAAAT4/GUDr9AufxYI/s400/Slide2.GIF" border="0" alt="" id="BLOGGER_PHOTO_ID_5700681404983276834" /&gt;&lt;/a&gt;
&lt;a href="http://2.bp.blogspot.com/-pzg5d8Dtfm8/Txzjig9VsnI/AAAAAAAAAUI/uzO5rtd0XQY/s1600/Slide3.GIF"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://2.bp.blogspot.com/-pzg5d8Dtfm8/Txzjig9VsnI/AAAAAAAAAUI/uzO5rtd0XQY/s400/Slide3.GIF" border="0" alt="" id="BLOGGER_PHOTO_ID_5700681410446471794" /&gt;&lt;/a&gt;
&lt;a href="http://1.bp.blogspot.com/-AMdTtQOS1qg/TxzjjK4KYmI/AAAAAAAAAUQ/BXlscGAlO2U/s1600/Slide4.GIF"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://1.bp.blogspot.com/-AMdTtQOS1qg/TxzjjK4KYmI/AAAAAAAAAUQ/BXlscGAlO2U/s400/Slide4.GIF" border="0" alt="" id="BLOGGER_PHOTO_ID_5700681421699048034" /&gt;&lt;/a&gt;
&lt;a href="http://3.bp.blogspot.com/-ZARyjR4FkVU/TxzjjZxLfEI/AAAAAAAAAUg/dbyQInGu8KM/s1600/Slide5.GIF"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/-ZARyjR4FkVU/TxzjjZxLfEI/AAAAAAAAAUg/dbyQInGu8KM/s400/Slide5.GIF" border="0" alt="" id="BLOGGER_PHOTO_ID_5700681425696291906" /&gt;&lt;/a&gt;
&lt;a href="http://3.bp.blogspot.com/-ZMd8mmAdllg/TxzlBPGQrPI/AAAAAAAAAUo/GdFR5vbpjFE/s1600/Slide6.GIF"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/-ZMd8mmAdllg/TxzlBPGQrPI/AAAAAAAAAUo/GdFR5vbpjFE/s400/Slide6.GIF" border="0" alt="" id="BLOGGER_PHOTO_ID_5700683037739625714" /&gt;&lt;/a&gt;
&lt;a href="http://4.bp.blogspot.com/-emFQlE7H8Fw/TxzlBihvF6I/AAAAAAAAAU0/7Qdcf_QiApg/s1600/Slide7.GIF"&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/-emFQlE7H8Fw/TxzlBihvF6I/AAAAAAAAAU0/7Qdcf_QiApg/s400/Slide7.GIF" border="0" alt="" id="BLOGGER_PHOTO_ID_5700683042955138978" /&gt;&lt;/a&gt;
&lt;a href="http://2.bp.blogspot.com/-JxrYqjfVJkY/TxzlB7K0Z0I/AAAAAAAAAVE/bnDZ4OHKi6Y/s1600/Slide8.GIF"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://2.bp.blogspot.com/-JxrYqjfVJkY/TxzlB7K0Z0I/AAAAAAAAAVE/bnDZ4OHKi6Y/s400/Slide8.GIF" border="0" alt="" id="BLOGGER_PHOTO_ID_5700683049569904450" /&gt;&lt;/a&gt;
&lt;a href="http://2.bp.blogspot.com/-l7zOnb0vlG0/TxzlCUcmnNI/AAAAAAAAAVM/cc1bMnHSRG0/s1600/Slide9.GIF"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://2.bp.blogspot.com/-l7zOnb0vlG0/TxzlCUcmnNI/AAAAAAAAAVM/cc1bMnHSRG0/s400/Slide9.GIF" border="0" alt="" id="BLOGGER_PHOTO_ID_5700683056355384530" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-5615203581427685448?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/5615203581427685448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2012/01/wcf-bindings-overview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/5615203581427685448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/5615203581427685448'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2012/01/wcf-bindings-overview.html' title='WCF Bindings - Overview'/><author><name>Rahul Shinde</name><uri>https://profiles.google.com/101471125327442213700</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-IcGTme6SFUw/AAAAAAAAAAI/AAAAAAAAAPQ/DkVOYWb-KGQ/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-re8GPEMvjpI/TxzjiEmXFqI/AAAAAAAAATs/JgNsM6S947A/s72-c/Slide1.GIF' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-2827913978158311892</id><published>2012-01-20T06:23:00.000-08:00</published><updated>2012-01-20T06:38:04.807-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Calling a Static Page Method using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
If you do not plan to call a web method from multiple pages, don’t perform all the work of creating a separate web service. Instead, you can expose a static method from the same AJAX page calling the web method.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;1..ASPX Page -&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;


&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="background: yellow; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;"&gt;&lt;!--span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;@&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: maroon;"&gt;Page&lt;/span&gt;
&lt;span style="color: red;"&gt;Language&lt;/span&gt;&lt;span style="color: blue;"&gt;="C#"&lt;/span&gt;
&lt;span style="color: red;"&gt;AutoEventWireup&lt;/span&gt;&lt;span style="color: blue;"&gt;="true"&lt;/span&gt;
&lt;span style="color: red;"&gt;CodeBehind&lt;/span&gt;&lt;span style="color: blue;"&gt;="ShowPageMethod.aspx.cs"&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt; line-height: normal; mso-layout-grid-align: none;" class="MsoNormal"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: red;"&gt;Inherits&lt;/span&gt;&lt;span style="color: blue;"&gt;="jQueryApp.StaticMethodCalling.ShowPageMethod"&lt;/span&gt;
&lt;span style="background: yellow; mso-highlight: yellow;"--&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&lt;!--sp--&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;DOCTYPE&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;html&lt;/span&gt; &lt;span style="color: red;"&gt;PUBLIC&lt;/span&gt; &lt;span style="color: blue;"&gt;"-//W3C//DTD
XHTML 1.0 Transitional//EN"&lt;/span&gt;&lt;span style="color: blue;"&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;html&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue;"&gt;="http://www.w3.org/1999/xhtml"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;head&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="Head1"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;title&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;Show Web Service Method&lt;span style="color: blue;"&gt;&lt;span style="color: maroon;"&gt;title&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;script&lt;/span&gt; &lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;="text/javascript"&lt;/span&gt;
&lt;span style="color: red;"&gt;src&lt;/span&gt;&lt;span style="color: blue;"&gt;="../Scripts/jquery-1.4.1.js"&amp;gt;&lt;span style="color: maroon;"&gt;script&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;script&lt;/span&gt; &lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;="text/javascript"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;$(document).ready(&lt;span style="color: blue;"&gt;function&lt;/span&gt; () {&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;$(&lt;span style="color: maroon;"&gt;"#btnGet"&lt;/span&gt;).click(&lt;span style="color: blue;"&gt;function&lt;/span&gt; () {&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;$.ajax({&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;type: &lt;span style="color: maroon;"&gt;"POST"&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;dataType: &lt;span style="color: maroon;"&gt;"json"&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;contentType: &lt;span style="color: maroon;"&gt;"application/json"&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;url: &lt;span style="color: maroon;"&gt;"ShowPageMethod.aspx/GetQuote"&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;success: &lt;span style="color: blue;"&gt;function&lt;/span&gt; (data) {&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;$(&lt;span style="color: maroon;"&gt;"#spanQuote"&lt;/span&gt;).html(data.d);&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;},&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;error: &lt;span style="color: blue;"&gt;function&lt;/span&gt; () {&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;alert(&lt;span style="color: maroon;"&gt;"The call to the web service failed."&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;})&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;});&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;});&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;span style="color: maroon;"&gt;script&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;head&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;body&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;form&lt;/span&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="form1"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;input&lt;/span&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="btnGet"&lt;/span&gt; &lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;="button"&lt;/span&gt;
&lt;span style="color: red;"&gt;value&lt;/span&gt;&lt;span style="color: blue;"&gt;="Get
Quote"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;br&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;br&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;span&lt;/span&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="spanQuote"&amp;gt;&lt;span style="color: maroon;"&gt;span&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;span style="color: maroon;"&gt;form&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;body&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;html&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Code Behind Code (.ASPX.CS)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Add this method&lt;br /&gt;
&amp;nbsp;

&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;[System.Web.Services.&lt;span style="color: #2b91af;"&gt;WebMethod&lt;/span&gt;]&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; GetQuote()&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt;
quotes = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;quotes.Add(&lt;span style="color: #a31515;"&gt;"The fool who is silent
passes for wise."&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;quotes.Add(&lt;span style="color: #a31515;"&gt;"The early bird catches the
worm."&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;quotes.Add(&lt;span style="color: #a31515;"&gt;"If wishes were true, shepherds
would be kings."&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af;"&gt;Random&lt;/span&gt; rnd = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;Random&lt;/span&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt; quotes[rnd.Next(quotes.Count)];&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-2827913978158311892?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/2827913978158311892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2012/01/calling-static-page-method-using-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/2827913978158311892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/2827913978158311892'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2012/01/calling-static-page-method-using-jquery.html' title='Calling a Static Page Method using jQuery'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-2689526357039680422</id><published>2012-01-20T06:17:00.000-08:00</published><updated>2012-01-20T06:18:13.651-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>Calling Web Services from the Client using jQuery</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;strong&gt;1. .ASMX page - Web Service Code:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;[&lt;span style="color: #2b91af;"&gt;WebService&lt;/span&gt;(Namespace
= &lt;span style="color: #a31515;"&gt;&lt;a href="http://tempuri.org/"&gt;http://tempuri.org/&lt;/a&gt;&lt;/span&gt;)]&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;[&lt;span style="color: #2b91af;"&gt;WebServiceBinding&lt;/span&gt;(ConformsTo
= &lt;span style="color: #2b91af;"&gt;WsiProfiles&lt;/span&gt;.BasicProfile1_1)]&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;[System.ComponentModel.&lt;span style="color: #2b91af;"&gt;ToolboxItem&lt;/span&gt;(&lt;span style="color: blue;"&gt;false&lt;/span&gt;)]&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: green; font-family: Consolas; font-size: 9.5pt;"&gt;// To allow this Web Service to be
called from script, using ASP.NET AJAX, uncomment the following line. &lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;[System.Web.Script.Services.&lt;span style="color: #2b91af;"&gt;ScriptService&lt;/span&gt;]&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;public&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;QuotationService&lt;/span&gt; : System.Web.Services.&lt;span style="color: #2b91af;"&gt;WebService&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;[&lt;span style="color: #2b91af;"&gt;WebMethod&lt;/span&gt;]&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt;
GetQuote()&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt;
quotes = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;quotes.Add(&lt;span style="color: #a31515;"&gt;"The fool who is silent
passes for wise."&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;quotes.Add(&lt;span style="color: #a31515;"&gt;"The early bird catches the
worm."&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;quotes.Add(&lt;span style="color: #a31515;"&gt;"If wishes were true,
shepherds would be kings."&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af;"&gt;Random&lt;/span&gt; rnd = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;Random&lt;/span&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt; quotes[rnd.Next(quotes.Count)];&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
2. .ASPX Page - Calling web service using jQuery&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;

&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="background: yellow; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;DOCTYPE&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;html&lt;/span&gt; &lt;span style="color: red;"&gt;PUBLIC&lt;/span&gt; &lt;span style="color: blue;"&gt;"-//W3C//DTD
XHTML 1.0 Transitional//EN"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;html&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue;"&gt;="http://www.w3.org/1999/xhtml"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;head&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="Head1"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;title&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;Show Web Service Method&lt;span style="color: blue;"&gt;&lt;span style="color: maroon;"&gt;title&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;script&lt;/span&gt; &lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;="text/javascript"&lt;/span&gt;
&lt;span style="color: red;"&gt;src&lt;/span&gt;&lt;span style="color: blue;"&gt;="../Scripts/jquery-1.4.1.js"&amp;gt;&lt;span style="color: maroon;"&gt;script&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;script&lt;/span&gt; &lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;="text/javascript"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;$(document).ready(&lt;span style="color: blue;"&gt;function&lt;/span&gt; () {&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;$(&lt;span style="color: maroon;"&gt;"#btnGet"&lt;/span&gt;).click(&lt;span style="color: blue;"&gt;function&lt;/span&gt; () {&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;$.ajax({&lt;span style="color: darkgreen;"&gt;//makes an asynchronous call to a
URL.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;type: &lt;span style="color: maroon;"&gt;"POST"&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;dataType: &lt;span style="color: maroon;"&gt;"json"&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;contentType: &lt;span style="color: maroon;"&gt;"application/json"&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;url: &lt;span style="color: maroon;"&gt;"QuotationService.asmx/GetQuote"&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;success: &lt;span style="color: blue;"&gt;function&lt;/span&gt; (data) {&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;$(&lt;span style="color: maroon;"&gt;"#spanQuote"&lt;/span&gt;).html(data.d);&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;},&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;error: &lt;span style="color: blue;"&gt;function&lt;/span&gt;
() {&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;alert(&lt;span style="color: maroon;"&gt;"The call to the web service failed."&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;})&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;});&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;});&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;span style="color: maroon;"&gt;script&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;head&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;body&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;form&lt;/span&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="form1"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;input&lt;/span&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="btnGet"&lt;/span&gt; &lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;="button"&lt;/span&gt;
&lt;span style="color: red;"&gt;value&lt;/span&gt;&lt;span style="color: blue;"&gt;="Get
Quote"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;br&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;br&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;span&lt;/span&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="spanQuote"&amp;gt;&lt;span style="color: maroon;"&gt;span&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;span style="color: maroon;"&gt;form&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;body&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&lt;span style="color: maroon; font-family: Consolas; font-size: 9.5pt;"&gt;html&lt;/span&gt;&lt;span style="color: blue; font-family: Consolas; font-size: 9.5pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: Consolas; font-size: 9.5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-2689526357039680422?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/2689526357039680422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2012/01/calling-web-services-from-client-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/2689526357039680422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/2689526357039680422'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2012/01/calling-web-services-from-client-using.html' title='Calling Web Services from the Client using jQuery'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-6723640046532120326</id><published>2012-01-20T06:06:00.000-08:00</published><updated>2012-01-20T06:07:42.319-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jQuery'/><title type='text'>What Is jQuery?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
jQuery is an extremely fast, lightweight JavaScript library that simplifies many aspects of client-side web development.You can use jQuery for almost any client-side functionality that you can think of—event handling,animations, drag-and-drop functionality, asynchronousweb service calls, and much more. Furthermore, jQuery supports a robust plug-in modelthat enables developers to write their own extensions to implement whatever functionality&lt;br /&gt;they want. &lt;br /&gt;
&lt;br /&gt;
There are already hundreds of powerful jQuery plug-ins available. jQuery is CSS3-compliant and works on almost all browsers—Internet Explorer 6.0+, FireFox 2+, Safari 3.0+, Opera 9.0, and Google Chrome. This means that you can write one set of code and not have to worry about handling the specifics of different browser implementations; each line of jQuery works exactly the same on all browsers.The jQuery library is used on an incredible number of popular websites. Google, Dell,&lt;br /&gt;Bank of America, Digg.com, Netflix, WordPress, and even the White House are some examples of websites that rely on jQuery for client-side functionality.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-6723640046532120326?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/6723640046532120326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2012/01/what-is-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/6723640046532120326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/6723640046532120326'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2012/01/what-is-jquery.html' title='What Is jQuery?'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-6064029749054768170</id><published>2011-01-23T23:17:00.000-08:00</published><updated>2011-01-24T01:45:31.254-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>WCF (Windows Communication Foundation)</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;What is WCF?&lt;/span&gt;
&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;WCF is service oriented technology. Using WCF framework, we can build the service oriented architecture. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;WCF is unification of .NET framework communication technologies like MSMQ, Remoting, Web Services and COM+.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-6064029749054768170?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/6064029749054768170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2011/01/wcf-windows-communication-foundation.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/6064029749054768170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/6064029749054768170'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2011/01/wcf-windows-communication-foundation.html' title='WCF (Windows Communication Foundation)'/><author><name>Jotiba Pawar</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_M-1VuhiYLgU/TPk2Ss-gPoI/AAAAAAAAA7Q/Pv_qBiqXR7k/S220/DSCF3263.JPG'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-978608204027184561</id><published>2009-11-07T03:43:00.001-08:00</published><updated>2012-01-20T05:55:25.811-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>Fiserv Interview Questions.</title><content type='html'>1) For edit functionality in DataGird specify Column name&lt;br /&gt;
2) Why you may not want to use Paging funtionality in data grid&lt;br /&gt;
3) Function of SqlCommanBuilder in code.&lt;br /&gt;
4) Find the error in code . Its related to database connection. I think that connection sould be closed in finally instead of try.&lt;br /&gt;
5) What is the relation between src='' &amp;amp; Inherits='' in &amp;lt;@ Page &amp;gt; directive&lt;br /&gt;
6) What is derective in the user control page &amp;amp; its extention of file&lt;br /&gt;
7) Question related to 404 error code Error page &amp;amp; Default error page.&lt;br /&gt;
8) Its related to Autherization in web config related to folders&lt;br /&gt;
9) Related to &lt;session mode="" tag="" timeout---=""&gt; definition&lt;br /&gt;
10) not remembred with question but answer is cookiless = true related question&lt;br /&gt;
11) Page is posting the 2 times why is it so 1) user control load 2) some control call load&lt;br /&gt;
12) describe !Page.PostBack Select Options&lt;br /&gt;
13) Question related to Session mode = SQLServer&lt;br /&gt;
14) Some question related to validation control - compare validator&lt;br /&gt;
15) Some question related to page inheritance - I think answer is - page&lt;br /&gt;
16) One question related to Asp.net 1.1 -- Is the mobile application will work in asp.net 1.1&lt;br /&gt;
17) question&amp;nbsp; related to ASP.NET AdRotator Control - what is &lt;impressions&gt; tag - A number that indicates the importance of the ad in the schedule of rotation relative to the other ads in the file (optional).&lt;br /&gt;
&lt;br /&gt;
The larger the number, the more often the ad is displayed. The total of all Impressions values in the XML file cannot exceed 2,047,999,999. If it does, the AdRotator throws a run-time exception.&lt;br /&gt;
&lt;br /&gt;
dont send me reply&lt;br /&gt;
&lt;br /&gt;
18) Some question related to - error related to - input id="Button1" onserverclick="check" runat="server" type="button" value="button" /&gt; &amp;amp; onserverclick&lt;br /&gt;
&lt;br /&gt;
19) In repeter control they want to show title -- &amp;lt;%#Container.DataItem("title")%&amp;gt; OR &amp;lt;%# DataBinder.Eval(Container.DataItem,"CustomerName") %&amp;gt; Or ... &lt;br /&gt;
20) Related to DataList -- Value &amp;amp; Text Showing Its simple.&lt;br /&gt;
21) when the Viewsate is avilable in life cycle - answer is after LOAD&lt;br /&gt;
22) Simple c# code answer is 1&lt;br /&gt;
23) What are the Session-State Modes ? ans - InPro,StateServer,SQLServer&lt;br /&gt;
24)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-978608204027184561?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/978608204027184561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/11/fiserv-interview-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/978608204027184561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/978608204027184561'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/11/fiserv-interview-questions.html' title='Fiserv Interview Questions.'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-6755169671853463103</id><published>2009-10-05T09:51:00.000-07:00</published><updated>2012-01-20T05:52:44.722-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>Send Email in asp.net</title><content type='html'>add System.Net.Mail; namespace&lt;br /&gt;
///*********************************************************************************&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;summary&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ///To Send the simple&amp;nbsp; Email&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;/summary&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;br /&gt;
&lt;param name="FromAddressId" /&gt;From Email Id&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;param name="ToAddressId" /&gt;To Email Id&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;param name="Subject" /&gt;Email Subject&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;param name="MessageBody" /&gt;Email Body&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;returns&gt;Returns bool with Indication&lt;/returns&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ///*********************************************************************************&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public bool SendEMail(string FromAddressId, string ToAddressId,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string Subject, string MessageBody)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SmtpClient objSmtpClient = new SmtpClient();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MailMessage message = new MailMessage();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MailAddress fromAddress = new MailAddress(FromAddressId);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objSmtpClient.Host = SmtpServerName;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objSmtpClient.Port = SmtpServerPortNo;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message.From = fromAddress;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message.To.Add(ToAddressId);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message.Subject = Subject;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message.IsBodyHtml = true;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message.Body = MessageBody;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objSmtpClient.Send(message);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception ex)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw ex;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; finally&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objSmtpClient = null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message = null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } // End Of Sendmail Function&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-6755169671853463103?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/6755169671853463103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/10/send-email-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/6755169671853463103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/6755169671853463103'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/10/send-email-in-aspnet.html' title='Send Email in asp.net'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-8382034722153534816</id><published>2009-10-05T09:42:00.000-07:00</published><updated>2012-01-20T05:52:44.725-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>Creating Error log</title><content type='html'>using System;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Configuration;&lt;br /&gt;
using System.Web;&lt;br /&gt;
using System.Web.Security;&lt;br /&gt;
using System.Web.UI;&lt;br /&gt;
using System.Web.UI.WebControls;&lt;br /&gt;
using System.Web.UI.WebControls.WebParts;&lt;br /&gt;
using System.Web.UI.HtmlControls;&lt;br /&gt;
using System.Data.SqlClient;&lt;br /&gt;
using CommonComponents;&lt;br /&gt;
using System.IO;&lt;br /&gt;
&lt;br /&gt;
/// &lt;summary&gt;&lt;br /&gt;
/// Summary description for clsErrorLog&lt;br /&gt;
/// &lt;/summary&gt;&lt;br /&gt;
public class clsErrorLog&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /*************************************************************&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; NAME:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WriteToErrorLog&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; PURPOSE:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Open or create an error log and submit error message&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; PARAMETERS:&amp;nbsp;&amp;nbsp;&amp;nbsp; ex - object of Exception class&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorTitle - title of the error&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorClass - name of form or class in which error occured&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorMethod - name of the method in which error occured&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; RETURNS:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Nothing&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; '*************************************************************/&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;summary&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// Open or create an error log and submit error message. Returns void&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;/summary&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;br /&gt;
&lt;param name="ex" /&gt;object of Exception class&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;param name="ErrorTitle" /&gt;title of the error&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;param name="ErrorClass" /&gt;name of form or class in which error occured&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;param name="ErrorMethod" /&gt;name of the method in which error occured&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;returns&gt;&lt;/returns&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void WriteToErrorLog(Exception ex, string ErrorTitle, string ErrorClass, string ErrorMethod)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* check and make the directory if necessary; this is set to look in &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; the application folder, you may wish to place the error log in &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; another location depending upon the user's role and write access to &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; different areas of the file system */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string strPath = HttpContext.Current.Server.MapPath("~\\Errors");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //if (!Directory.Exists(strPath))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp; Directory.CreateDirectory(strPath);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DirectoryInfo objDirInfor = new DirectoryInfo(strPath);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!objDirInfor.Exists)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objDirInfor.Create();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //check the file&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileStream fs = new FileStream(strPath + "\\MilesSelfTestWebErrorlog.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StreamWriter s = new StreamWriter(fs);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s.Close();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fs.Close();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //log it&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileStream fs1 = new FileStream(strPath + "\\MilesSelfTestWebErrorlog.txt", FileMode.Append, FileAccess.Write);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StreamWriter s1 = new StreamWriter(fs1);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Text.StringBuilder strErrorDesc = new System.Text.StringBuilder("");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strErrorDesc.AppendLine("Title: " + ErrorTitle + Environment.NewLine);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strErrorDesc.AppendLine("ErrorClass: " + ErrorClass + Environment.NewLine);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strErrorDesc.AppendLine("ErrorMethod: " + ErrorMethod + Environment.NewLine);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strErrorDesc.AppendLine("Message: " + ex.Message + Environment.NewLine);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strErrorDesc.AppendLine("StackTrace: " + ex.StackTrace + Environment.NewLine);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strErrorDesc.AppendLine("Date/Time: " + DateTime.Now.ToString() + Environment.NewLine);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strErrorDesc.AppendLine("================================================" + Environment.NewLine);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s1.Write(strErrorDesc.ToString());&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s1.Close();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fs1.Close();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //clsEmail objSimpleEmail = new clsEmail();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //objSimpleEmail.SendEMail("admin@nigeriaexamsonline.com", "bhaveshp@iprogrammer.co.in, milindm@iprogrammer.co.in", ErrorTitle, strErrorDesc.ToString());&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //objSimpleEmail = null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-8382034722153534816?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/8382034722153534816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/10/creating-error-log.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/8382034722153534816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/8382034722153534816'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/10/creating-error-log.html' title='Creating Error log'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-8295615474333570923</id><published>2009-09-16T00:17:00.000-07:00</published><updated>2012-01-20T05:55:47.727-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Finding Nth Highest Salary Query</title><content type='html'>&lt;b&gt;SELECT max(sal) FROM&amp;nbsp; tbltemp WHERE sal NOT IN&lt;br /&gt;
(SELECT distinct top 2 sal FROM tbltemp ORDER BY sal desc)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
for eg. for 3rd highest top will be 3-1 =2&amp;nbsp; (top 2) therefore &lt;b&gt;top N-1&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Or&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;SELECT TOP 1 sal&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style="display: inline !important;"&gt;&lt;b&gt;&lt;b&gt;FROM (&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT DISTINCT TOP 2 sal&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM tbltemp&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ORDER BY sal DESC&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;) A&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;ORDER BY sal&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-8295615474333570923?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/8295615474333570923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/finding-nth-highest-salary-query.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/8295615474333570923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/8295615474333570923'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/finding-nth-highest-salary-query.html' title='Finding Nth Highest Salary Query'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-4057361982122653192</id><published>2009-09-14T00:31:00.000-07:00</published><updated>2012-01-20T05:52:44.718-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>Adding Custom Tags in Web.config</title><content type='html'>To add cutom tag in your web config its a simple process. I will expain it step by step&lt;br /&gt;
&lt;br /&gt;
Add&amp;nbsp; Following to your web config&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_IzExBLonS2E/Sq30avZA0cI/AAAAAAAAA-M/aqezGNlXHfM/s1600-h/2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_IzExBLonS2E/Sq30avZA0cI/AAAAAAAAA-M/aqezGNlXHfM/s400/2.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;configsections&gt;&lt;mycustomsection&gt;&lt;add key="FirstName" value="Milind"&gt;&lt;add key="Surname" value="Mahajan"&gt;&lt;/add&gt;Remember you have to add information about your System assembly which you can find in your GAC (Global assembly cache) Path: "&lt;b&gt;C:\WINDOWS\assembly&lt;/b&gt;" right click on System assembly and you will get Property about it.&lt;br /&gt;
&lt;br /&gt;
Then to get those custom tag values&amp;nbsp; write the following code on default.aspx.cs file&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;
{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
NameValueCollection Col = new NameValueCollection();&lt;br /&gt;
Col = (NameValueCollection)System.Configuration.ConfigurationManager.GetSection("MyCustomSection");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 0; i &amp;lt; c1.Keys.Count; i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write(String.Format("Key = {0}, Value = {1} ", c1.Keys[i], c1[i].ToString()));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/add&gt;&lt;/mycustomsection&gt;&lt;/configsections&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-4057361982122653192?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/4057361982122653192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/adding-custom-tags-in-webconfig.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/4057361982122653192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/4057361982122653192'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/adding-custom-tags-in-webconfig.html' title='Adding Custom Tags in Web.config'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_IzExBLonS2E/Sq30avZA0cI/AAAAAAAAA-M/aqezGNlXHfM/s72-c/2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-8812978159402704805</id><published>2009-09-09T19:39:00.000-07:00</published><updated>2012-01-20T05:53:03.257-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Design Pattern'/><title type='text'>Singleton Design Pattern</title><content type='html'>&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cmilind%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cmilind%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cmilind%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @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:Verdana;
	panose-1:2 11 6 4 3 5 4 4 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:536871559 0 0 0 415 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	margin-top:0in;
	margin-right:0in;
	margin-bottom:10.0pt;
	margin-left:0in;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-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;}
p
	{mso-style-noshow:yes;
	mso-style-priority:99;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";}
.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;}
.MsoPapDefault
	{mso-style-type:export-only;
	margin-bottom:10.0pt;
	line-height:115%;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
--&gt;
&lt;/style&gt;      &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;one of the good explanation found in ASP.NET 3.5 Application Architecture Design&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt; &lt;br /&gt;
&lt;u1:p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cmilind%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cmilind%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cmilind%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @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:Verdana;
	panose-1:2 11 6 4 3 5 4 4 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:536871559 0 0 0 415 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	margin-top:0in;
	margin-right:0in;
	margin-bottom:10.0pt;
	margin-left:0in;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-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;}
p
	{mso-style-noshow:yes;
	mso-style-priority:99;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";}
.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;}
.MsoPapDefault
	{mso-style-type:export-only;
	margin-bottom:10.0pt;
	line-height:115%;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
--&gt; 
&lt;/style&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type"&gt;&lt;/meta&gt;&lt;meta content="Word.Document" name="ProgId"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Generator"&gt;&lt;/meta&gt;&lt;meta content="Microsoft Word 12" name="Originator"&gt;&lt;/meta&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cmilind%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cmilind%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5Cmilind%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @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:Verdana;
	panose-1:2 11 6 4 3 5 4 4 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:536871559 0 0 0 415 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	margin-top:0in;
	margin-right:0in;
	margin-bottom:10.0pt;
	margin-left:0in;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-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;}
p
	{mso-style-noshow:yes;
	mso-style-priority:99;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	mso-fareast-font-family:"Times New Roman";}
.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;}
.MsoPapDefault
	{mso-style-type:export-only;
	margin-bottom:10.0pt;
	line-height:115%;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
--&gt;
&lt;/style&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;public sealed class EmailManager&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;{&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;private static EmailManager _manager;&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;//Private constructor so that objects cannot be created&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;private EmailManager()&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;{&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;}&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;public static EmailManager GetInstance()&lt;u1:p&gt;&lt;/u1:p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;{&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;// Use 'Lazy initialization'&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;if (_manager == null)&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt 1in;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;{&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt 1in;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;//ensure thread safety using locks&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt 1in;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;lock(typeof(EmailManager)&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt 1in;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;{&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt 1in;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;_manager = new EmailManager();&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt 1in;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;}&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;}&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt 0.5in;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;return _manager;&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;}&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;u2:p&gt;&lt;/u2:p&gt;  &lt;br /&gt;
&lt;div style="line-height: 115%; margin: 0in 0in 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; line-height: 115%;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div style="line-height: 115%;"&gt;&lt;/div&gt;&lt;div style="line-height: 115%;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; line-height: 115%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;let us understand the code step-by-step:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;br /&gt;
&lt;div style="text-align: justify;"&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;1. public sealed class EmailManager:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt; We have used the sealed keyword to make our EmailManager class uninheritable. This is not necessary, but there is no use having derived classes as there can be only one instance of this class in memory. Having derived class objects will let us create two or more instances which will be against the singleton's design objective.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;b&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;2. private static EmailManager _manager:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;Next, we create a variable named _manager, which holds a reference to the single instance of our EmailManager class. We have used a static modifier because we will be accessing this variable from a static method—GetEmailManager(), and static methods can use only static variables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;private EmailManager()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;We need to create a private constructor to make sure that we don't accidentally initialize an object of the GetEmailManager class. By only initializing via the static GetInstance() method, we should get a single instance of this class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;3. &lt;b&gt;public static EmailManager GetInstance()&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;// Use 'Lazy initialization'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;if (_manager == null)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;//ensure thread safety using locks&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;lock(typeof(EmailManager)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;_manager = new EmailManager();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;return _manager;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;GetInstance() is the static method that we will use from outside this code to get the current reference of the EmailManager class. In this method, we are using the lazy loading technique to load the instance on demand. We first check if the current instance is null or not. If it is null, then we create a new one; otherwise we return the existing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;static instance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;lock(typeof(EmailManager)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;b&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;4. &lt;b&gt;The private _manager objec&lt;/b&gt;t, marked static, is used inside a critical section (using lock) to make sure it is thread safe. Thread safety is very important here. Otherwise, two threads might simultaneously call GetInstance() and, on finding the EmailManager instance (_manager) null, will both try to create an instance, thereby creating two instances of the class. The lock keyword helps us make sure that once a thread enters the region, no other thread can do so until the first thread exits, making our code thread safe. We pass the EmailManager's type in order to lock the statement using the typeof operator to define the scope of the lock statement.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;An important point to note is that in the above code we have to make sure that the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;type used in the typeof() command is not publicly accessible, otherwise the scope&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;would be affected. It is better to create a private object within our class to use as a&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;reference object in the lock statement, as in:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;private static object forLock = new object();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;public static EmailManager GetInstance()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;// Use 'Lazy initialization'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;if (_manager == null)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;//ensure thread safety using locks&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;lock(typeof(forLock)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;_manager = new EmailManager();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;return _manager;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;"&gt;So the above code can be used for implementing a Singleton design pattern in&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;  &lt;br /&gt;
&lt;div style="line-height: 115%;"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; line-height: 115%;"&gt;ASP.NET effectively and safely.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-8812978159402704805?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/8812978159402704805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/singleton-design-pattern.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/8812978159402704805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/8812978159402704805'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/singleton-design-pattern.html' title='Singleton Design Pattern'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-181464082025684996</id><published>2009-09-07T03:12:00.000-07:00</published><updated>2012-01-20T05:54:18.368-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>SOAP Header (credentials) for cosuming web service</title><content type='html'>Its the optional part of SOAP Message. Instead including meta data (Credentials) in your web signature you can use SOAP header to consume web service.&lt;br /&gt;
&lt;br /&gt;
// SOAP Header class&lt;br /&gt;
&lt;br /&gt;
public class HelloHeader : SoapHeader&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public string Username;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public string Password;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public HelloHeader myHeader;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [WebMethod]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [SoapHeader("myHeader")]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public string HelloWorld()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (myHeader == null)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "Hello World";&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "Hello " + myHeader.Username + ". " +&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&lt;br /&gt;
Your password is: " + myHeader.Password;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Consuming this web service&lt;br /&gt;
localhost.HelloHeader objHEader = new WindowsApplication1.localhost.HelloHeader();&lt;br /&gt;
localhost.HelloSoapHeader objService = new WindowsApplication1.localhost.HelloSoapHeader();&lt;br /&gt;
objHEader.Username = "milind";&lt;br /&gt;
objHEader.Password = "mahajan";&lt;br /&gt;
objService.HelloHeaderValue = objHEader;&lt;br /&gt;
MessageBox.Show( objService.HelloWorld());&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-181464082025684996?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/181464082025684996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/soap-header-for-passing-credentials-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/181464082025684996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/181464082025684996'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/soap-header-for-passing-credentials-to.html' title='SOAP Header (credentials) for cosuming web service'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-1103402887255297697</id><published>2009-09-07T02:52:00.000-07:00</published><updated>2012-01-20T05:54:18.365-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>Metod overloading in web serive</title><content type='html'>To overload web methods you have to use &lt;b&gt;MessageName &lt;/b&gt;attribute otherwise you will get error. &lt;br /&gt;
&lt;br /&gt;
[WebMethod(MessageName = "Hello")]&lt;br /&gt;
public string Hello()&lt;br /&gt;
{&lt;br /&gt;
return "Hello";&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
[WebMethod(MessageName = "HelloWithFirstName")]&lt;br /&gt;
public string Hello(string FirstName)&lt;br /&gt;
{&lt;br /&gt;
return "Hello " + FirstName;&lt;br /&gt;
}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-1103402887255297697?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/1103402887255297697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/metod-overloading-in-web-serive.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/1103402887255297697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/1103402887255297697'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/metod-overloading-in-web-serive.html' title='Metod overloading in web serive'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-1047136314754835870</id><published>2009-09-07T02:29:00.001-07:00</published><updated>2012-01-20T05:54:18.361-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>Web serice to upload image on server</title><content type='html'>/// &lt;b&gt;web service&lt;/b&gt;&lt;br /&gt;
/// Upload image on server with the .jpg, .ico, .gif, .bmp, .png formats.&lt;br /&gt;
/// Size should be less than 80kb&lt;br /&gt;
///&lt;br /&gt;
/// /// ///&lt;br /&gt;
[WebMethod]&lt;br /&gt;
public string UploadImage(byte[] ImgIn, string FileName)&lt;br /&gt;
{&lt;br /&gt;
MemoryStream ms = null;&lt;br /&gt;
Bitmap b = null;&lt;br /&gt;
try&lt;br /&gt;
{&lt;br /&gt;
ms = new MemoryStream(ImgIn);&lt;br /&gt;
if (ms.Length &amp;lt;= 80000) // 80kb limit for image to upload&lt;br /&gt;
{&lt;br /&gt;
b = (Bitmap)Image.FromStream(ms);&lt;br /&gt;
if (FileName.ToLower().Contains(".jpeg") || FileName.ToLower().Contains(".jpg"))&lt;br /&gt;
b.Save("C:\\" + FileName, System.Drawing.Imaging.ImageFormat.Jpeg);&lt;br /&gt;
if (FileName.ToLower().Contains(".gif"))&lt;br /&gt;
b.Save("C:\\" + FileName, System.Drawing.Imaging.ImageFormat.Gif);&lt;br /&gt;
if (FileName.ToLower().Contains(".bmp"))&lt;br /&gt;
b.Save("C:\\" + FileName, System.Drawing.Imaging.ImageFormat.Bmp);&lt;br /&gt;
if (FileName.ToLower().Contains(".png"))&lt;br /&gt;
b.Save("C:\\" + FileName, System.Drawing.Imaging.ImageFormat.Png);&lt;br /&gt;
if (FileName.ToLower().Contains(".ico"))&lt;br /&gt;
b.Save("C:\\" + FileName, System.Drawing.Imaging.ImageFormat.Icon);&lt;br /&gt;
return "Uploaded successfully.";&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
return "Image size should be less than 80kb.";&lt;br /&gt;
}&lt;br /&gt;
catch (Exception ex)&lt;br /&gt;
{&lt;br /&gt;
return "Some error occurred, please try again later.";&lt;br /&gt;
}&lt;br /&gt;
finally&lt;br /&gt;
{&lt;br /&gt;
if (ms != null)&lt;br /&gt;
ms.Dispose();&lt;br /&gt;
if (b != null)&lt;br /&gt;
b.Dispose();&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//&lt;b&gt; Consuming the web service&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
localhost.ImageUpload obj = new localhost.ImageUpload();&lt;br /&gt;
FileStream fs = new FileStream(FileUpload1.PostedFile.FileName, FileMode.OpenOrCreate, FileAccess.Read);&lt;br /&gt;
Byte[] img = new Byte[fs.Length];&lt;br /&gt;
fs.Read(img, 0, Convert.ToInt32(fs.Length));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
lblMsg.Text = obj.UploadImage(img, FileUpload1.FileName);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-1047136314754835870?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/1047136314754835870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/web-serice-to-upload-image-on-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/1047136314754835870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/1047136314754835870'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/web-serice-to-upload-image-on-server.html' title='Web serice to upload image on server'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-3163749896871059671</id><published>2009-09-02T05:04:00.000-07:00</published><updated>2012-01-20T05:54:18.374-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>Nullable in c#</title><content type='html'>Nullable types can represent all the values of an underlying type, and an additional&amp;nbsp; null value. Nullable types are declared in one of two ways:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Nullable&lt;t&gt; variable&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -or-&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; T? variable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
Any value type may be used as the basis for a nullable type&lt;/t&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;class Program&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; static void Main(string[] args)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int? x = 10;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (x.HasValue)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Console.WriteLine(x.Value);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Console.WriteLine("Undefined");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.ReadKey();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int? y = null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (y != null)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Console.WriteLine(y.Value);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Console.WriteLine("Undefined");&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.ReadKey();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int? n = 5;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //int m1 = n;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Will not compile.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int m2 = (int)n;&amp;nbsp;&amp;nbsp; // Compiles, but will create an exception if n is null.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int m3 = n.Value;&amp;nbsp; // Compiles, but will create an exception if n is null.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.ReadKey();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int A = 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Console.WriteLine("A++ = {0}", A++);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A = A + 1;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Console.WriteLine("A = A + 1 {0}", A);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Console.WriteLine("++A {0}", ++A);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.ReadKey();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-3163749896871059671?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/3163749896871059671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/nullable-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/3163749896871059671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/3163749896871059671'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/nullable-in-c.html' title='Nullable in c#'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-6744869111764577532</id><published>2009-09-02T04:58:00.001-07:00</published><updated>2012-01-20T05:54:18.376-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>Explicit keyword in c#</title><content type='html'>The explicit keyword is used to declare an &lt;b&gt;explicit user-defined type conversion operator&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;class Celsius&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Celsius(float temp)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; degrees = temp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
// define explicit Celsius-to-Fahrenheit conversion operator:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static explicit operator Fahrenheit(Celsius c)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return new Fahrenheit((9.0f / 5.0f) * c.degrees + 32);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public float Degrees&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get { return degrees; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private float degrees;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; class Fahrenheit&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Fahrenheit(float temp)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; degrees = temp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
// define explicit Fahrenheit-to-Celsius conversion operator:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static explicit operator Celsius(Fahrenheit f)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return new Celsius((5.0f / 9.0f) * (f.degrees - 32));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public float Degrees&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get { return degrees; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private float degrees;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
static void Main(string[] args)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fahrenheit f = new Fahrenheit(100.0f);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.Write("{0} fahrenheit", f.Degrees);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Celsius c = (Celsius)f;// explicit conversion&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.Write(" = {0} celsius", c.Degrees);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fahrenheit f2 = (Fahrenheit)c;// explicit conversion&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(" = {0} fahrenheit", f2.Degrees);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-6744869111764577532?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/6744869111764577532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/explicit-keyword-in-c.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/6744869111764577532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/6744869111764577532'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/explicit-keyword-in-c.html' title='Explicit keyword in c#'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-8762799694898673376</id><published>2009-09-01T06:43:00.000-07:00</published><updated>2012-01-20T05:55:09.723-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Cursor in sql server</title><content type='html'>-To fetch row by row data
&lt;ol&gt;&lt;li&gt;Declare Cursor&lt;/li&gt;&lt;li&gt;Open&lt;/li&gt;&lt;li&gt;Fetch first time
&lt;/li&gt;&lt;li&gt;fetch data until @@Fetch_Status = 0
&lt;/li&gt;&lt;li&gt;Close&lt;/li&gt;&lt;li&gt;Deallocate&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-weight: bold;"&gt;Disadvantage:&lt;/span&gt;
- Time Consuming
- required lot of resources &amp;amp; temporary storage.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-8762799694898673376?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/8762799694898673376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/cursor-in-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/8762799694898673376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/8762799694898673376'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/cursor-in-sql-server.html' title='Cursor in sql server'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-6707192384752379022</id><published>2009-09-01T06:37:00.000-07:00</published><updated>2012-01-20T05:55:09.718-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>View in sql server</title><content type='html'>Referred as "Virtual Table"
Can not store data (except for indexed views) rather than only referto data present in table.

e.g.  Create View vwsample
[optional]
With Encryption OR
With Schemabinding
[/optional]
AS

Select Cid, CName FRom Customer

GO

With Encryption - You can see view query (its encrypted)
With Schemabinding - You are not able to alter table on which it's created.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-6707192384752379022?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/6707192384752379022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/view.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/6707192384752379022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/6707192384752379022'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/view.html' title='View in sql server'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-2697850861278580971</id><published>2009-09-01T06:18:00.000-07:00</published><updated>2012-01-20T05:54:18.371-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>Assembly in .net</title><content type='html'>-It is the fundamental building block of .net framework
-basic unit of deployment or versioning (.exe or .dll)&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_IzExBLonS2E/Sp0hZh0yIAI/AAAAAAAAA8g/qmyCmfMHmXo/s1600-h/zst29sk2.Local_-1693671859_assemblyover1%28en-US,VS.80%29.gif"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 160px; height: 120px;" src="http://4.bp.blogspot.com/_IzExBLonS2E/Sp0hZh0yIAI/AAAAAAAAA8g/qmyCmfMHmXo/s400/zst29sk2.Local_-1693671859_assemblyover1%28en-US,VS.80%29.gif" alt="" id="BLOGGER_PHOTO_ID_5376490252610445314" border="0" /&gt;&lt;/a&gt;
-Consisting
&lt;ol&gt;&lt;li&gt;Manifest &lt;/li&gt;&lt;li&gt;Metadata&lt;/li&gt;&lt;li&gt;IL Code&lt;/li&gt;&lt;li&gt;Resources&lt;/li&gt;&lt;/ol&gt;1) Manifest- Describe assembly itself

Contents
&lt;ol&gt;&lt;li&gt;Assembly Name&lt;/li&gt;&lt;li&gt;Version number&lt;/li&gt;&lt;li&gt;Culture&lt;/li&gt;&lt;li&gt;Strong name information&lt;/li&gt;&lt;li&gt;List of files&lt;/li&gt;&lt;li&gt;Type reference information&lt;/li&gt;&lt;li&gt;Information on reference assemblies&lt;/li&gt;&lt;/ol&gt;2) Metdata- Describe Contents within assembly like Classes, Namespaces, Interfaces, Scope, Properties, Methods &amp;amp; their parameteres.

3) IL Code- The compilers translates your code into Microsoft intermediate language (MSIL). The common language runtime includes a JIT compiler for converting this MSIL then to native code.

4) Resources- are the files like image files&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-2697850861278580971?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/2697850861278580971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/assembly.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/2697850861278580971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/2697850861278580971'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/assembly.html' title='Assembly in .net'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_IzExBLonS2E/Sp0hZh0yIAI/AAAAAAAAA8g/qmyCmfMHmXo/s72-c/zst29sk2.Local_-1693671859_assemblyover1%28en-US,VS.80%29.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-8802382397752757855</id><published>2009-09-01T05:20:00.000-07:00</published><updated>2009-09-01T06:05:14.797-07:00</updated><title type='text'>Command Object's Method</title><content type='html'>objects exposes methods for executing commands based on the type of command and desired return value

1) &lt;b&gt;ExecuteNonQuery: &lt;/b&gt;Executes a command that does not return any rows.
2) &lt;b&gt;ExecuteReader: &lt;/b&gt;Returns a &lt;b&gt;DataReader&lt;/b&gt; object.
3) &lt;span style="font-weight: bold;"&gt;ExecuteRow:&lt;/span&gt; Return sql record (return one datbase record)
4) &lt;b&gt;ExecuteScalar: &lt;/b&gt;Returns a single scalar value.
5) &lt;b&gt;ExecuteXMLReader: &lt;/b&gt;Returns an  XmlReader. Available for a SqlCommand object only.&lt;b&gt;
&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-8802382397752757855?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/8802382397752757855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/command-objects-method.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/8802382397752757855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/8802382397752757855'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/command-objects-method.html' title='Command Object&apos;s Method'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-9162548582381524719</id><published>2009-09-01T02:37:00.000-07:00</published><updated>2012-01-20T05:55:09.726-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Triggers in sql server</title><content type='html'>&lt;span style="font-weight: bold;"&gt; Definition:&lt;/span&gt;

Are special type of stored procedure that are defined to execute automatically, &lt;span style="font-weight: bold;"&gt;In place of or after data&lt;/span&gt; modification when Insert, Update, Delete triggering actions occurred on that table.


&lt;span style="font-weight: bold;"&gt;1) After Trigger

&lt;/span&gt;Fired the triggering action.
Executed automatically before the transaction is committed or rolled back.

e.g.

CREATE TRIGGER trgCheckStock ON [products]
FOR UPDATE
AS

IF( Select inStockFrom &lt;span style="font-weight: bold;"&gt;inserted&lt;/span&gt;) &lt; 0)
BEGIN
          PRINT 'Can not oversell products'
          PRINT 'Transaction has been canceled'
END
GO

&lt;span style="font-weight: bold;"&gt;2) Instead Of&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;Trigger&lt;/span&gt;

Fire in place of the triggering action.
Executed automatically before primary key and foreign key constraints are checked.

e.g.

CREATE TRIGGER trgCantDelete ON table1
INSTEAD OF DELETE
AS
    PRINT 'you cannot delete this data'
GO&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-9162548582381524719?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/9162548582381524719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/triggers-in-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/9162548582381524719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/9162548582381524719'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/triggers-in-sql-server.html' title='Triggers in sql server'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-4038051911996564483</id><published>2009-09-01T02:36:00.000-07:00</published><updated>2009-09-04T03:51:57.077-07:00</updated><title type='text'>Resume</title><content type='html'>&lt;object align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" height="550" id="doc_614359060834854" name="doc_614359060834854" width="520"&gt; &lt;param name="movie" value="http://documents.scribd.com/ScribdViewer.swf?document_id=3584013&amp;access_key=key-9ibz8hyy8r60x79nxf6&amp;page=1&amp;version=1"&gt;&lt;param name="quality" value="high"&gt;&lt;param name="play" value="true"&gt;&lt;param name="loop" value="true"&gt;&lt;param name="scale" value="showall"&gt;&lt;param name="wmode" value="opaque"&gt;&lt;param name="devicefont" value="false"&gt;&lt;param name="bgcolor" value="#ffffff"&gt;&lt;param name="menu" value="true"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;param name="salign" value=""&gt;&lt;embed src="http://documents.scribd.com/ScribdViewer.swf?document_id=3584013&amp;access_key=key-9ibz8hyy8r60x79nxf6&amp;page=1&amp;version=1" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" play="true" loop="true" scale="showall" wmode="opaque" devicefont="false" bgcolor="#ffffff" name="doc_614359060834854_object" menu="true" allowfullscreen="true" allowscriptaccess="always" salign="" type="application/x-shockwave-flash" align="middle" height="550" width="520"&gt;&lt;/embed&gt; &lt;/object&gt;&lt;br /&gt;
&lt;div style="font-size: 10px; text-align: center;"&gt;&lt;a href="http://www.scribd.com/doc/3584013/Latest-Resume"&gt;Latest Resume&lt;/a&gt; - &lt;a href="http://www.scribd.com/upload"&gt;Upload a Document to Scribd&lt;/a&gt;&lt;/div&gt;&lt;div style="display: none;"&gt;Read this document on Scribd: &lt;a href="http://www.scribd.com/doc/3584013/Latest-Resume"&gt;Latest Resume&lt;/a&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-4038051911996564483?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/4038051911996564483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2008/06/resume.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/4038051911996564483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/4038051911996564483'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2008/06/resume.html' title='Resume'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-8326619349294307896</id><published>2009-09-01T02:25:00.000-07:00</published><updated>2012-01-20T05:56:37.764-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>Differance between Value Type and Referance Type</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Value Type:&lt;/span&gt;

1) Stored in stack.
2) Access directly.
3) Life time determine by lifetime of variable that contain them.
4) e.g. All numeric data type, Boolean, char, Date,  Structure, enumerations.

&lt;span style="font-weight: bold;"&gt;Reference Type:&lt;/span&gt;

1) Stored in heap.
2) Access through references.
3) Lifetime is managed by .net framework.
4) e.g.  All arrays, String, Class types, Delegate.

&lt;span style="font-weight: bold;"&gt;Note: &lt;/span&gt;Object is not any kind of type. You can create object of structure as well as Class

&lt;span style="font-weight: bold;"&gt;Are not type: &lt;/span&gt;Namespaces, Modules, Events, properties, procedures, variables, constants ,&amp;amp; fields.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-8326619349294307896?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/8326619349294307896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/differance-between-value-type-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/8326619349294307896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/8326619349294307896'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/differance-between-value-type-and.html' title='Differance between Value Type and Referance Type'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-4419376267668306737</id><published>2009-09-01T02:09:00.000-07:00</published><updated>2012-01-20T05:56:37.749-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>Differance between Dataset and Datareader</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Dataset&lt;/span&gt;

1) Read/write access to data.
2) Disconnected architecture.
3) Include multiple table from different database.
4) Bind to multiple controls.
5) forward and backward scanning of data.
6) supported by visual studio .net tool.
7) you can set relation between tables.

&lt;span style="font-weight: bold;"&gt;DataReader&lt;/span&gt;

1) Read only
2) Connected architecture.
3) Include 1 table from 1 database only.
4) Bind to one control only.
5) fast forward only.
6) Manually coded.
7) No relations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-4419376267668306737?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/4419376267668306737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/differance-between-dataset-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/4419376267668306737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/4419376267668306737'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/differance-between-dataset-and.html' title='Differance between Dataset and Datareader'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-7997516050129968211</id><published>2009-09-01T02:03:00.000-07:00</published><updated>2012-01-20T05:56:37.762-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>Differance between Strucutre and Class</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Structure:

&lt;/span&gt;1) Value type stored in stack.
2) Inheritance is not possible in structure.
3) do not require constructor.
4) objects are not terminated by GC.
5) members can not be protected.

&lt;span style="font-weight: bold;"&gt;Class:

&lt;/span&gt;1) Reference type stored in heap.
2) Inheritance is possible.
3) Contain constructor.
4) object is terminated by GC.
3) Member can be any type.
&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-7997516050129968211?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/7997516050129968211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/differance-between-strucutre-and-class.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/7997516050129968211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/7997516050129968211'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/differance-between-strucutre-and-class.html' title='Differance between Strucutre and Class'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-7027928448388689770</id><published>2009-09-01T01:15:00.000-07:00</published><updated>2012-01-20T05:56:37.752-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>Differeance between Interface and Abstract Class</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Interface:

&lt;/span&gt;1) Define a Contract.
2) can inherit only interfaces.
3) don't have constructor and distructor.
4) don't have concrete methods.
5) Inheritable by Structure.
6) Multiple inheritance is possible using Interface.
7) All members are Public by default.

&lt;span style="font-weight: bold;"&gt;Abstract Class:&lt;/span&gt;

1) Can't be initiated, partially implemented.
2) Can inherit classes &amp;amp; Interfaces.
3) Can have Constructor &amp;amp; Distructor.
4) Some methods can be concrete.
5) Not inheritable by structure.
6) Multiple inheritance not possible.
7) Members can have many modifiers.
&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-7027928448388689770?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/7027928448388689770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/differeance-between-interface-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/7027928448388689770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/7027928448388689770'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/differeance-between-interface-and.html' title='Differeance between Interface and Abstract Class'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-7635046769408204083</id><published>2009-09-01T01:10:00.000-07:00</published><updated>2012-01-20T05:56:37.759-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>Differance between Overloading and Overriding</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Overloading:
&lt;/span&gt;
1) Same name in same/derived class but with different/type of parameter.
2) Compiletime polymorphism.
3) Having Different signature.

&lt;span style="font-weight: bold;"&gt;Overriding:&lt;/span&gt;

1) we need to provide different implementation than base class.
2) Runtime Polymorphism.
3) Having same signature.
&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-7635046769408204083?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/7635046769408204083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/differance-between-overloading-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/7635046769408204083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/7635046769408204083'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/differance-between-overloading-and.html' title='Differance between Overloading and Overriding'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-3939383224534038575</id><published>2009-09-01T01:01:00.000-07:00</published><updated>2012-01-20T05:56:37.745-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>Differance between Const and Readonly</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Const

&lt;/span&gt;1) Value evaluated at compile time
2) can't be static.
3) Initialize at declaration only.

e.g. const int a = 100

&lt;span style="font-weight: bold;"&gt;Readonly&lt;/span&gt;

1) Value evaluated at runtime.
2) Can be static.
3) can initialize at declaration or in constructor.

e.g.  public readonly int doc = 5;
              public program()
              { doc = 5; }
&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-3939383224534038575?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/3939383224534038575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/differance-between-const-and-readonly.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/3939383224534038575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/3939383224534038575'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/differance-between-const-and-readonly.html' title='Differance between Const and Readonly'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-2868948594089821751</id><published>2009-09-01T00:52:00.000-07:00</published><updated>2012-01-20T05:57:51.451-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Differance between Truncate and Delete</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Truncate&lt;/span&gt;

1) Delete all rows.
2) Identity counter retain.
3) Don't make entry to transaction log. therefore it is faster.
4) DDL command.
5) can not rollback
6) do not activate trigger.

&lt;span style="font-weight: bold;"&gt;Delete&lt;/span&gt;

1) Delete 1 or more row depend on where clause.
2) retain Identity counter.
3) Make entery to transaction log. so it is slower.
4) DML command.
5) Can be rollback.
6) Activate trigger.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-2868948594089821751?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/2868948594089821751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/09/differance-between-truncate-and-delete.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/2868948594089821751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/2868948594089821751'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/09/differance-between-truncate-and-delete.html' title='Differance between Truncate and Delete'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-199001132642605439</id><published>2009-08-28T05:53:00.000-07:00</published><updated>2012-01-20T05:57:51.447-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Differance between Stored Procedure &amp; User define functiona(UDF)</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Stored Procedure&lt;/span&gt;1) If error occurred then execute next statement.&lt;br /&gt;
2) Use EXECUTE or EXEC to run.3) Can return values not mandatory.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;
&lt;/span&gt;4) SP can not be called from UDF.&lt;br /&gt;
5) Have transaction.&lt;br /&gt;
6) Can use XML FROM Clause.&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;UDF&lt;/span&gt;1) If error occurred then can not execute next statement.&lt;br /&gt;
2) Execute from sql SELECT or SQL action queries.&lt;br /&gt;
3) Must return 1 Value or table.&lt;br /&gt;
4) UDF can be called from SP.&lt;br /&gt;
5) Don't have transaction because don't have DML queries.&lt;br /&gt;
6) Can't use XML FROM Clause.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-199001132642605439?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/199001132642605439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/08/differance-between-stored-procedure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/199001132642605439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/199001132642605439'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/08/differance-between-stored-procedure.html' title='Differance between Stored Procedure &amp; User define functiona(UDF)'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-6402440156262811759</id><published>2009-08-24T03:16:00.000-07:00</published><updated>2009-08-31T23:58:55.503-07:00</updated><title type='text'>ASP.NET AJAX Server Control</title><content type='html'>&lt;span style="font-weight: bold;"&gt;1. ScriptManager:&lt;/span&gt; it takes care of loading the JavaScript libraries needed by ASP.NET AJAX.

A component control that manages the marshalling of messages to the AJAX-enabled server for the parts of the page requiring partial updates. Every ASP.NET page will require a ScriptManager control in order to work. It is important to note that you can have only a single ScriptManager control on a page.

   &lt;span style="font-weight: bold;"&gt;2. ScriptManagerProxy:&lt;/span&gt; Enables nested components such as content pages and user controls to add script and service references to pages when a ScriptManager control is already defined in a parent element.


A component control that acts as a ScriptManager control for a content page. The ScriptManagerProxy control, which sits on the content page (or sub-page), works in conjunction with a required ScriptManager control that resides on the master page.

   &lt;span style="font-weight: bold;"&gt;3. Timer:&lt;/span&gt; The Timer control performs postbacks at defined intervals. If you use the Timer control with an UpdatePanel control, you can enable partial-page updates at a defined interval. You can also use the Timer control to post the whole page.The Timer control will execute client-side events at specific intervals and allows specific parts of your page to update or refresh at these moments.

  &lt;span style="font-weight: bold;"&gt; 4. UpdatePanel:&lt;/span&gt; A container control that allows you to define specific areas of the page that are enabled to work with the ScriptManager. These areas can then, in turn, make the partial page postbacks and update themselves outside the normal ASP.NET page postback process.

  &lt;span style="font-weight: bold;"&gt; 5. UpdateProgress: &lt;/span&gt;A control that allows you to display a visual element to the end user to show that a partial-page postback is occurring to the part of the page making the update. This is an ideal control to use when you have long-running AJAX updates.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-6402440156262811759?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/6402440156262811759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/08/aspnet-ajax-server-control.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/6402440156262811759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/6402440156262811759'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/08/aspnet-ajax-server-control.html' title='ASP.NET AJAX Server Control'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-5953600249340127403</id><published>2009-07-29T01:22:00.000-07:00</published><updated>2012-01-20T05:58:45.194-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Hosting a WCF Service</title><content type='html'>WCF is flexible because its services can be hosted in different types of applications. The following lists several common scenarios for hosting WCF services:

&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Self-hosting&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Managed Windows Service&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;IIS (II6 and IIS7)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;WAS&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-5953600249340127403?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/5953600249340127403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/07/hosting-wcf-service.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/5953600249340127403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/5953600249340127403'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/07/hosting-wcf-service.html' title='Hosting a WCF Service'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-4549983110282379387</id><published>2009-07-29T00:43:00.000-07:00</published><updated>2012-01-20T05:58:45.191-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>WCF contracts</title><content type='html'>WCF contracts define the behavior of WCF services. They are created in code by service developers, and are exposed to clients in the service metadata.

The five types of contracts:&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;
&lt;blockquote&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Service Contracts&lt;/span&gt;&lt;/li&gt;&lt;li&gt;   &lt;span style="font-weight: bold;"&gt;Operation Contracts&lt;/span&gt;&lt;/li&gt;&lt;li&gt;   &lt;span style="font-weight: bold;"&gt;Data Contracts&lt;/span&gt;&lt;/li&gt;&lt;li&gt;   &lt;span style="font-weight: bold;"&gt;Message Contracts&lt;/span&gt;&lt;/li&gt;&lt;li&gt;   &lt;span style="font-weight: bold;"&gt;Fault Contracts&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/blockquote&gt;&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="PowerPoint.Slide"&gt;&lt;meta name="Generator" content="Microsoft PowerPoint 11"&gt;&lt;!--[if !mso]&gt; &lt;style&gt; v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} p\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} v\:textbox {display:none;} &lt;/style&gt; &lt;![endif]--&gt;&lt;title&gt;Slide 23&lt;/title&gt;&lt;meta name="Description" content="7/29/2009"&gt;&lt;!--[if !ppt]--&gt;&lt;style&gt; .O 	{color:black; 	font-size:149%;} a:link 	{color:#85D0E7 !important;} a:active 	{color:#787878 !important;} a:visited 	{color:#B4B4B4 !important;} &lt;/style&gt;&lt;style media="print"&gt; &lt;!--.sld 	{left:0px !important; 	width:6.0in !important; 	height:4.5in !important; 	font-size:103% !important;} --&gt; &lt;/style&gt;&lt;!--[endif]--&gt;&lt;o:shapelayout ext="edit"&gt;&lt;/o:shapelayout&gt;&lt;o:idmap ext="edit" data="1"&gt;&lt;/o:idmap&gt;&lt;p:colorscheme colors="#ffffff,#000000,#c8c8c8,#006c8e,#009bcc,#787878,#85d0e7,#b4b4b4"&gt;  &lt;div shape="_x0000_s1026" class="O"&gt;  &lt;div style=""&gt;&lt;span style="color: rgb(120, 120, 120); position: absolute; left: -2.25%;font-family:Wingdings;" &gt;§&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p:colorscheme&gt;1.A service contract defines the operations that a service supports, and maps to a portType in Web Service Description Language (WSDL).
Service contracts are implemented as .NET Framework interfaces that are annotated with the ServiceContract attribute.

   [ServiceContract]
   public interface IMyContract { ...}

2.Operation contracts define the individual operations that a service supports and map to operations in WSDL.
Operations are defined by adding methods to a Service Contract interface that is annotated with the OperationContract attribute.

   [OperationContract]
   void SomeOperation();

3.Data contracts define how complex types are serialized when they are used in WCF service operations.
They are defined by applying the DataContract and DataMember attributes to classes.

   [DataContract]
   public class SomeType{ [DataMember] public int ID;}

4.Message contracts describe the entire SOAP message format.
They can use data contracts and serializable types to emit schema for complex types, and they also make it possible to control the SOAP message headers and body explicitly, by using a single type.
Message contracts provide a simple method to add custom SOAP headers to incoming and outgoing messages.

   [MessageContract]
   public class MyRequest
   {        [MessageHeader]
                 public string field1;
                [MessageBody]
                 public string field2;
       }


5.A WCF service reports errors by using Fault objects.
Fault contracts document the errors that WCF code is likely to produce, and WCF maps Fault objects to SOAP faults.
Note that the type specified in the FaultContract does not have to be an exception, although it often will be.



&lt;span style="font-weight: bold;"&gt;Example
&lt;/span&gt;
[DataContract]
    public class Eval
    {
        [DataMember]
        public string Id;
        [DataMember]
        public string Comments;
        [DataMember]
        public string Submitter;
        [DataMember]
        public DateTime TimeSubmitted;
    }&lt;span style="font-weight: bold;"&gt;

&lt;/span&gt;[ServiceContract]
    public interface IEvalService
    {
        [OperationContract]
        void SubmitEval(Eval eval);
        [OperationContract]
        List&lt;eval&gt; GetEval();
        [OperationContract]
        void RemoveEval(string id);
    }&lt;span style="font-weight: bold;"&gt;
&lt;/span&gt;
[ServiceBehavior(InstanceContextMode= InstanceContextMode.Single)]
    public class EvalService : IEvalService
    {
        #region IEvalService Members

        List&lt;eval&gt; evals = new List&lt;eval&gt;();

        public void SubmitEval(Eval eval)
        {
            eval.Id = Guid.NewGuid().ToString();
            evals.Add(eval);
        }

        public List&lt;eval&gt; GetEval()
        {
            return evals;
        }

        public void RemoveEval(string id)
        {
            evals.Remove(evals.Find(e =&gt; e.Id.Equals(id)));
        }

        #endregion
    }
&lt;span style="font-weight: bold;"&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-4549983110282379387?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/4549983110282379387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/07/wcf-contracts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/4549983110282379387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/4549983110282379387'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/07/wcf-contracts.html' title='WCF contracts'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-1316173336068868345</id><published>2009-07-28T04:39:00.000-07:00</published><updated>2012-01-20T05:58:45.188-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Windows Communication Foundation is...</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Some Important points I have collected from MSDN site are:

A part of the .NET Framework that provides a unified programming model for rapidly building service-oriented applications that communicate across the web and the enterprise.&lt;/span&gt;

The global acceptance of Web services, which includes standard protocols for application-to-application communication, has changed software development. For example, the functions that Web services now provide include security, distributed transaction coordination, and reliable communication. The benefits of the changes in Web services should be reflected in the tools and technologies that developers use. Windows Communication Foundation (WCF) is designed to offer a manageable approach to distributed computing, broad interoperability, and direct support for service orientation.

WCF simplifies development of connected applications through a new service-oriented programming model. WCF supports many styles of distributed application development by providing a layered architecture. At its base, the WCF channel architecture provides asynchronous, untyped message-passing primitives. Built on top of this base are protocol facilities for secure, reliable, transacted data exchange and broad choice of transport and encoding options.

The typed programming model (called the service model) is designed to ease the development of distributed applications and to provide developers with expertise in ASP.NET Web services, .NET Framework remoting, and Enterprise Services, and who are coming to WCF with a familiar development experience. The service model features a straightforward mapping of Web services concepts to those of the .NET Framework common language runtime (CLR), including flexible and extensible mapping of messages to service implementations in languages such as Visual C# or Visual Basic. It includes serialization facilities that enable loose coupling and versioning, and it provides integration and interoperability with existing .NET Framework distributed systems technologies such as Message Queuing (MSMQ), COM+, ASP.NET Web services, Web Services Enhancements (WSE), and a number of other functions.

&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 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CMILIND%7E1.IPS%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.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: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:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&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" latentstylecount="156"&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;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} p 	{mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:474416051; 	mso-list-template-ids:809535970;} @list l0:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&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-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p&gt;Most important aspects of WCF: &lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style="margin-bottom: 12pt;"&gt;Unification of existing .NET      Framework communication technologies.&lt;/li&gt;&lt;li class="MsoNormal" style="margin-bottom: 12pt;"&gt;Support for cross-vendor      interoperability, including reliability, security, and transactions. &lt;/li&gt;&lt;li class="MsoNormal" style="margin-bottom: 12pt;"&gt;Explicit service orientation.&lt;/li&gt;&lt;/ul&gt;&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 11"&gt;&lt;meta name="Originator" content="Microsoft Word 11"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CMILIND%7E1.IPS%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.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: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:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&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" latentstylecount="156"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} h2 	{mso-style-next:Normal; 	margin-top:12.0pt; 	margin-right:0in; 	margin-bottom:3.0pt; 	margin-left:0in; 	mso-pagination:widow-orphan; 	page-break-after:avoid; 	mso-outline-level:2; 	font-size:14.0pt; 	font-family:Arial; 	font-weight:bold; 	font-style:italic;} a:link, span.MsoHyperlink 	{color:blue; 	text-decoration:underline; 	text-underline:single;} a:visited, span.MsoHyperlinkFollowed 	{color:purple; 	text-decoration:underline; 	text-underline:single;} p 	{mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} pre 	{margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; 	font-size:10.0pt; 	font-family:"Courier New"; 	mso-fareast-font-family:"Times New Roman";} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in .75in 1.0in .5in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&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-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;h2&gt;WCF Terms&lt;/h2&gt;  &lt;p&gt;Other concepts and terms used in the WCF documentation include the following.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;message&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;A message is a self-contained unit of data that may consist of several parts, including a body and headers. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;service&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;A service is a construct that exposes one or more endpoints, with each endpoint exposing one or more service operations. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;endpoint&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;An endpoint is a construct at which messages are sent or received (or both). It comprises a location (an address) that defines where messages can be sent, a specification of the communication mechanism (a binding) that described how messages should be sent, and a definition for a set of messages that can be sent or received (or both) at that location (a service contract) that describes what message can be sent.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;An WCF service is exposed to the world as a collection of endpoints.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;application endpoint&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;An endpoint exposed by the application and that corresponds to a service contract implemented by the application.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;infrastructure endpoint&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;An endpoint that is exposed by the infrastructure to facilitate functionality that is needed or provided by the service that does not relate to a service contract. For example, a service might have an infrastructure endpoint that provides metadata information.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;address&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;An address specifies the location where messages are received. It is specified as a Uniform Resource Identifier (URI). The URI schema part names the transport mechanism to use to reach the address, such as HTTP and TCP. The hierarchical part of the URI contains a unique location whose format is dependent on the transport mechanism. &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;The endpoint address enables you to create unique endpoint addresses for each endpoint in a service, or under certain conditions share an address across endpoints. The following example shows an address using the HTTPS protocol with a non-default port:&lt;/p&gt;  &lt;pre style="margin-left: 0.5in;"&gt;HTTPS://cohowinery:8005/ServiceModelSamples/CalculatorService&lt;/pre&gt;  &lt;p class="MsoNormal"&gt;binding&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;A binding defines how an endpoint communicates to the world. It is constructed of a set of components called binding elements that "stack" one on top of the other to create the communication infrastructure. At the very least, a binding defines the transport (such as HTTP or TCP) and the encoding being used (such as text or binary). A binding can contain binding elements that specify details like the security mechanisms used to secure messages, or the message pattern used by an endpoint. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/ms733830.aspx"&gt;Configuring Windows Communication Foundation Services&lt;/a&gt;.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;binding element&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;A binding element represents a particular piece of the binding, such as a transport, an encoding, an implementation of an infrastructure-level protocol (such as WS-ReliableMessaging), or any other component of the communication stack.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;behaviors&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;A behavior is a component that controls various run-time aspects of a service, an endpoint, a particular operation, or a client. Behaviors are grouped according to scope: common behaviors affect all endpoints globally, service behaviors affect only service-related aspects, endpoint behaviors affect only endpoint-related properties, and operation-level behaviors affect particular operations. For example, one service behavior is throttling, which specifies how a service reacts when an excess of messages threaten to overwhelm its handling capabilities. An endpoint behavior, on the other hand, controls only aspects relevant to endpoints, such as how and where to find a security credential. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;system-provided bindings&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;WCF includes a number of system-provided bindings. These are collections of binding elements that are optimized for specific scenarios. For example, the &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.wshttpbinding.aspx"&gt;WSHttpBinding&lt;/a&gt; is designed for interoperability with services that implement various WS-* specifications. These predefined bindings save time by presenting only those options that can be correctly applied to the specific scenario. If a predefined binding does not meet your requirements, you can create your own custom binding.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;configuration versus coding&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;Control of an application can be done either through coding, through configuration, or through a combination of both. Configuration has the advantage of allowing someone other than the developer (for example, a network administrator) to set client and service parameters after the code is written and without having to recompile. Configuration not only enables you to set values like endpoint addresses, but also allows further control by enabling you to add endpoints, bindings, and behaviors. Coding allows the developer to retain strict control over all components of the service or client, and any settings done through the configuration can be inspected and if needed overridden by the code. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;service operation&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;A service operation is a procedure defined in a service's code that implements the functionality for an operation. This operation is exposed to clients as methods on a WCF client. The method may return a value, and may take an optional number of arguments, or take no arguments, and return no response. For example, an operation that functions as a simple "Hello" can be used as a notification of a client's presence and to begin a series of operations. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;service contract&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;The service contract ties together multiple related operations into a single functional unit. The contract can define service-level settings, such as the namespace of the service, a corresponding callback contract, and other such settings. In most cases, the contract is defined by creating an interface in the programming language of your choice and applying the &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.servicecontractattribute.aspx"&gt;ServiceContractAttribute&lt;/a&gt; attribute to the interface. The actual service code results by implementing the interface. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;operation contract&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;An operation contract defines the parameters and return type of an operation. When creating an interface that defines the service contract, you signify an operation contract by applying the &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.operationcontractattribute.aspx"&gt;OperationContractAttribute&lt;/a&gt; attribute to each method definition that is part of the contract. The operations can be modeled as taking a single message and returning a single message, or as taking a set of types and returning a type. In the latter case, the system will determine the format for the messages that need to be exchanged for that operation.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;message contract&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;A message contract describes the format of a message. For example, it declares whether message elements should go in headers versus the body, what level of security should be applied to what elements of the message, and so on.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;fault contract&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;A fault contract can be associated with a service operation to denote errors that can be returned to the caller. An operation can have zero or more faults associated with it. These errors are SOAP faults that are modeled as exceptions in the programming model.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;data contract&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;The data types a service uses must be described in metadata to enable others to interoperate with the service. The descriptions of the data types are known as the data contract, and the types can be used in any part of a message, for example, as parameters or return types. If the service is using only simple types, there is no need to explicitly use data contracts.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;hosting&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;A service must be hosted in some process. A &lt;em&gt;host&lt;/em&gt; is an application that controls the lifetime of the service. Services can be self-hosted or managed by an existing hosting process.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;self-hosted service&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;A self-hosted service is one that runs within a process application that the developer created. The developer controls its lifetime, sets the properties of the service, opens the service (which sets it into a listening mode), and closes the service. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;hosting process&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;A hosting process is an application that is designed to host services. These include Internet Information Services (IIS), Windows Activation Services (WAS), and Windows Services. In these hosted scenarios, the host controls the lifetime of the service. For example, using IIS you can set up a virtual directory that contains the service assembly and configuration file. When a message is received, IIS starts the service and controls its lifetime. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;instancing&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;A service has an instancing model. There are three instancing models: "single," in which a single CLR object services all the clients; "per call," in which a new CLR object is created to handle each client call; and "per session," in which a set of CLR objects are created, one for each separate session. The choice of an instancing model depends on the application requirements and the expected usage pattern of the service. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;client application&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;A client application is a program that exchanges messages with one or more endpoints. The client application begins by creating an instance of a WCF client and calling methods of the WCF client. It is important to note that a single application can be both a client and a service.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;channel&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;A channel is a concrete implementation of a binding element. The binding represents the configuration, and the channel is the implementation associated with that configuration. Therefore, there is a channel associated with each binding element. Channels stack on top of each other to create the concrete implementation of the binding: the channel stack.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;WCF client&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;A WCF&lt;em&gt; client&lt;/em&gt; is a client-application construct that exposes the service operations as methods (in the .NET Framework programming language of your choice, such as Visual Basic or Visual C#). Any application can host a WCF client, including an application that hosts a service. Therefore, it is possible to create a service that includes WCF clients of other services.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;A WCF client can be automatically generated by using the &lt;a href="http://msdn.microsoft.com/en-us/library/aa347733.aspx"&gt;ServiceModel Metadata Utility Tool (Svcutil.exe)&lt;/a&gt; and pointing it at a running service that publishes metadata.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;metadata &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;The metadata of a service describes the characteristics of the service that an external entity needs to understand to communicate with the service. Metadata can be consumed by the &lt;a href="http://msdn.microsoft.com/en-us/library/aa347733.aspx"&gt;ServiceModel Metadata Utility Tool (Svcutil.exe)&lt;/a&gt; to generate a WCF client and accompanying configuration that a client application can use to interact with the service.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;The metadata exposed by the service includes XML schema documents, which define the data contract of the service, and WSDL documents, which describe the methods of the service.&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;When enabled, metadata for the service is automatically generated by WCF by inspecting the service and its endpoints. To publish metadata from a service, you must explicitly enable the metadata behavior.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;security&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;Security in WCF includes confidentiality (encryption of messages to prevent eavesdropping), integrity (the means for detection of tampering with the message), authentication (the means for validation of servers and clients), and authorization (the control of access to resources). These functions are provided by either leveraging existing security mechanisms, such as TLS over HTTP (also known as HTTPS), or by implementing one or more of the various WS-* security specifications. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;transport security mode&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;Security can be provided by one of three modes: transport mode, message security mode, and transport with message credential mode. The transport security mode specifies that confidentiality, integrity, and authentication are provided by the transport layer mechanisms (such as HTTPS). When using a transport like HTTPS, this mode has the advantage of being efficient in its performance, and well understood because of its prevalence on the Internet. The disadvantage is that this kind of security is applied separately on each hop in the communication path, making the communication susceptible to a "man in the middle" attack.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;message security mode&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;Message security mode specifies that security is provided by implementing one or more of the security specifications, such as the specification named "Web Services Security: SOAP Message Security" (available at http://go.microsoft.com/fwlink/?LinkId=94684). Each message contains the necessary mechanisms to provide security during its transit, and to enable the receivers to detect tampering and to decrypt the messages. In this sense, the security is encapsulated within every message, providing end-to-end security across multiple hops. Because security information becomes part of the message, it is also possible to include multiple kinds of credentials with the message (these are referred to as &lt;em&gt;claims&lt;/em&gt;). This approach also has the advantage of enabling the message to travel securely over any transport, including multiple transports between its origin and destination. The disadvantage of this approach is the complexity of the cryptographic mechanisms employed, resulting in performance implications.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;transport with message credential security mode&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;This mode uses the transport layer to provide confidentiality, authentication, and integrity of the messages, while each of the messages can contain multiple credentials (claims) required by the receivers of the message.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;WS-*&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;Shorthand for the growing set of Web Service (WS) specifications, such as WS-Security, WS-ReliableMessaging, and so on, that are implemented in WCF.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt; 


&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-1316173336068868345?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/1316173336068868345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/07/windows-communication-foundation-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/1316173336068868345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/1316173336068868345'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/07/windows-communication-foundation-is.html' title='Windows Communication Foundation is...'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-3385300577381026795</id><published>2009-01-17T00:20:00.000-08:00</published><updated>2012-01-20T05:59:38.093-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>Xml Rss Blog Feed In Asp.Net</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_IzExBLonS2E/SXGW_f3_jWI/AAAAAAAAAlg/oN-Kq_S99yI/s1600-h/rss_feed.JPG"&gt;&lt;img style="cursor: pointer; width: 404px; height: 196px;" src="http://4.bp.blogspot.com/_IzExBLonS2E/SXGW_f3_jWI/AAAAAAAAAlg/oN-Kq_S99yI/s400/rss_feed.JPG" alt="" id="BLOGGER_PHOTO_ID_5292177054769319266" border="0" /&gt;&lt;/a&gt;
Rss feed using XmlDataSource Control &amp;amp; Data bound control( here I had used datalist)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-3385300577381026795?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/3385300577381026795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/01/xml-rss-blog-feed-in-aspnet.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/3385300577381026795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/3385300577381026795'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/01/xml-rss-blog-feed-in-aspnet.html' title='Xml Rss Blog Feed In Asp.Net'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_IzExBLonS2E/SXGW_f3_jWI/AAAAAAAAAlg/oN-Kq_S99yI/s72-c/rss_feed.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-3112020292035381538</id><published>2009-01-15T07:59:00.001-08:00</published><updated>2012-01-20T06:00:59.593-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>Method Overloading Example</title><content type='html'>&lt;span style="color: rgb(102, 51, 102);font-size:85%;" &gt;public class AddingNumbers
       {
           ///
           /// Method Overloading
           ///
           /// Example : Console.WriteLine() &amp;amp; System.Math.Sign()
           /// overloading a method when you for some reason need a couple of methods that take different perameters,
           ///  but conceptually do the same thing.
           ///
           ///
           ///
           ///
           public int Add(int a, int b)
           {
               return a + b;
           }
           public int Add(int a, int b, int c)
           {
               return a + b + c;
           }       
// Error'OOPS_Overloading.Program.AddingNumbers' already defines a member called 'Add' with the same parameter types C:\Documents and Settings\milindm\My Documents\Visual Studio 2005\Projects\OOPS_Overloading\OOPS_Overloading\Program.cs 21 27 OOPS_Overloading
           /*
           public string Add(int a, int b, int c)
           {
               return  Convert.ToString(a + b + c);
           }*/
       }

       static void Main(string[] args)
       {
           AddingNumbers obj = new AddingNumbers();
           Console.WriteLine( "Result1:  {0}",obj.Add(1,2));
           Console.WriteLine("Result2:  {0}", obj.Add(1, 2, 5));
           Console.ReadKey();
       }&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-3112020292035381538?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/3112020292035381538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/01/method-overloading-example_4372.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/3112020292035381538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/3112020292035381538'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/01/method-overloading-example_4372.html' title='Method Overloading Example'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-4940557912094043699</id><published>2009-01-15T06:47:00.001-08:00</published><updated>2012-01-20T06:00:59.596-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>Interface Example</title><content type='html'>&lt;span style="color: rgb(102, 51, 102);font-size:85%;" &gt;Interface  Example interface IPoint
   {
       // Property signatures:
       int x { get; set;}
       int y { get; set;}
       // method signature
       void print_points();
   }

   class Point : IPoint
   {
       // Fields:
       private int _x;
       private int _y;
       // Constructor:
       public Point(int x, int y)
       {
           _x = x;
           _y = y;
       }
       // Property Implementation:
       public int x
       {
           get
           {
               return _x;
           }

           set
           {
               _x = value;
           }
       }

       public int y
       {
           get
           {
               return _y;
           }
           set
           {
               _y = value;
           }
       }
       // Method Implementation
       public void print_points()
       {
           Console.WriteLine("{0} {1}", _x, _y);
       }
   }

   class Program
   {
       ///
       /// Interface
       ///
       /// -An interface contains only the signatures of methods, properties, events or indexers.
       /// -An Interface can not be intiated
       /// -An Interface can be inherited
       /// -All the members are public
       /// -multiple inheritace is possible
/// -An interface is like an abstract base class: any non-abstract type inheriting the interface must implement all its members.
       /// -An interface cannot be instantiated directly.
       /// -Interfaces contain no implementation of methods.
       /// -Classes and structs can inherit from more than one interface.
       /// -An interface can itself inherit from multiple interfaces.

       static void PrintPoint(IPoint p)
       {
           Console.WriteLine("x={0}, y={1}", p.x, p.y);
       }

       ///
       ///
       static void Main(string[] args)
       {
           Point p = new Point(2, 3);
           Console.Write("My Point: ");
           PrintPoint(p);
           p.print_points();
           Console.ReadKey(); 
       }
   }&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-4940557912094043699?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/4940557912094043699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/01/interface-example_15.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/4940557912094043699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/4940557912094043699'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/01/interface-example_15.html' title='Interface Example'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-2269923773852470036</id><published>2009-01-15T05:45:00.000-08:00</published><updated>2012-01-20T06:00:59.590-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>Abstract Example</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(102, 51, 102);"&gt; abstract class BaseClass   // Abstract class&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;    {&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        protected int _x = 100;&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        protected int _y = 150;&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        public abstract void AbstractMethod();   // Abstract method&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        public abstract int X { get; }&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        public abstract int Y { get; }&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;    }&lt;/span&gt;

&lt;span style="color: rgb(102, 51, 102);"&gt;    class Program : BaseClass&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;    {&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// &lt;summary&gt;&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// Abstract Class&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// Use the abstract modifier in a method or property declaration to indicate that the method &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        ///  or property does not contain implementation.&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// Use the abstract modifier in a class declaration to indicate that a class is intended only&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// to be a base class of other classes. &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// The abstract modifier can be used with classes, methods, properties, indexers, and events. &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// -An abstract class cannot be instantiated.&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// -An abstract class class cannot be inherited.&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// -An abstract class may contain abstract methods and accessors.&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// -A non-abstract class derived from an abstract class must include actual implementations &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        ///   of all inherited abstract methods and accessors.&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// Abstract methods&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// -An abstract method is implicitly a virtual method.&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// -Abstract method declarations are only permitted in abstract classes.&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// -It is an error to use the static or virtual modifiers in an abstract method declaration. &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// Abstract properties &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// -Abstract properties behave like abstract methods, except for the differences in declaration and invocation syntax.&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// -It is an error to use the abstract modifier on a static property.&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// -An abstract inherited property can be overridden in a derived class by including a property declaration that uses&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// the override modifier.&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// An abstract class must provide implementation for all interface members. &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;           /*interface I &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            {&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;                void M();&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            }&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            abstract class C: I &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            {&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;                public abstract void M();&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            } */&lt;/span&gt;

&lt;span style="color: rgb(102, 51, 102);"&gt;        public override void AbstractMethod()&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        {&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            _x++;&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            _y++;&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        }&lt;/span&gt;

&lt;span style="color: rgb(102, 51, 102);"&gt;        public override int X   // overriding property&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        {&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            get&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            {&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;                return _x + 10;&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            }&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        }&lt;/span&gt;

&lt;span style="color: rgb(102, 51, 102);"&gt;        public override int Y   // overriding property&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        {&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            get&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            {&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;                return _y + 10;&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            }&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        }&lt;/span&gt;

&lt;span style="color: rgb(102, 51, 102);"&gt;        static void Main(string[] args)&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        {&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            Program o = new Program();&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            o.AbstractMethod();&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            Console.WriteLine("x = {0}, y = {1}", o.X, o.Y);&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            Console.ReadKey();&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            /*Output&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;              x = 111, y = 161*/&lt;/span&gt;

&lt;span style="color: rgb(102, 51, 102);"&gt;        }&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;    }&lt;/span&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-2269923773852470036?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/2269923773852470036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/01/abstract-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/2269923773852470036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/2269923773852470036'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/01/abstract-example.html' title='Abstract Example'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-1202395371761354884</id><published>2009-01-15T05:18:00.001-08:00</published><updated>2012-01-20T06:00:59.587-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>Static Constructor Example</title><content type='html'>&lt;span style="color: rgb(102, 51, 102);font-size:85%;" &gt;///
       /// A static constructor is used to initialize any static data, or to perform a particular action that
       /// needs performed once only. It is called automatically before the first instance is created or any
       /// static members are referenced.
       ///
       /// -A static constructor does not take access modifiers or have parameters.
       /// -A static constructor is called automatically to initialize the class before the first instance is created
       ///    or any static members are referenced.
       /// -A static constructor cannot be called directly.
       /// -The user has no control on when the static constructor is executed in the program.
       /// -A typical use of static constructors is when the class is using a log file and the constructor is used
       ///    to write entries to this file.
       /// -Static constructors are also useful when creating wrapper classes for unmanaged code, when the constructor
       /// can call the LoadLibrary method.
       ///
       ///
       ///

       class A
       {
           static A()
           {
               System.Console.WriteLine("The static constructor invoked.");
           }
           public static void Test()
           {
               System.Console.WriteLine("The Drive method invoked.");
           }
       }

       static void Main(string[] args)
       {
           A.Test();
           // OutOut
           // The static constructor invoked.
           // The Drive method invoked.
       }&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-1202395371761354884?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/1202395371761354884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/01/static-constructor-example_15.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/1202395371761354884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/1202395371761354884'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/01/static-constructor-example_15.html' title='Static Constructor Example'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-5010768433375282029</id><published>2009-01-15T05:06:00.001-08:00</published><updated>2012-01-20T06:00:59.598-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>Sealed Class Example</title><content type='html'>&lt;span style="color: rgb(102, 51, 102);font-size:100%;" &gt;         ///
      /// Sealed Class
      ///
      /// You can Initiate the class
      /// You can not Inherit the class :  class B : A   { }
      /// Structs are implicitly sealed; therefore, they cannot be inherited.
      /// System.Threading.Thread
      ///
      ///

      sealed class A
      { 
          public A() { }
          public void Test1()
          { }
          public static void Test2()
          { }

      }
      /*//Error : 'OOPS_Sealed.Program.B': cannot derive from sealed type 'OOPS_Sealed.Program.A'  
      class B : A   { }*/

      static void Main(string[] args)
      {
          A obj = new A();
          A.Test2();
      }&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-5010768433375282029?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/5010768433375282029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/01/sealed-class-example_15.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/5010768433375282029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/5010768433375282029'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/01/sealed-class-example_15.html' title='Sealed Class Example'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-6899579680510862639</id><published>2009-01-15T04:52:00.000-08:00</published><updated>2012-01-20T06:00:59.605-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>Go through Static class example</title><content type='html'>&lt;span style="color: rgb(102, 51, 102);"&gt; /// &lt;summary&gt;&lt;/summary&gt;&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// Static Class&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// You can not Initiate  : A obj = new A();&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// You can not Inherited : class B : A { }&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// All the members in Static class are static&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// They cannot contain Instance Constructors : public A { }&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /// &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        static class A&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        {&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;         &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            /* Error    'test': cannot declare instance members in a static class&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;               public void test() { } */&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            public static void test()&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            { }&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        }&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;         &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        /*Error cannot derive from static class 'OOPS_Concept.Program.A'&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;          class B : A { }   */&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;      &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        static void Main(string[] args)&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        {&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;           /* Error 1    Cannot declare variable of static type 'OOPS_Concept.Program.A'&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;              Error 2    Cannot create an instance of the static class                                                         'OOPS_Concept.Program.A'&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            A obj = new A();*/      &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;    &lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;            A.test();&lt;/span&gt;
&lt;span style="color: rgb(102, 51, 102);"&gt;        }&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-6899579680510862639?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/6899579680510862639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2009/01/go-through-static-class-example-static.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/6899579680510862639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/6899579680510862639'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2009/01/go-through-static-class-example-static.html' title='Go through Static class example'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-483755005790006235</id><published>2008-09-24T03:39:00.000-07:00</published><updated>2008-09-24T03:47:38.566-07:00</updated><title type='text'>In Windows application Tag Property of radio button (controls) is useful as like value field of controls in web Application</title><content type='html'>I don't have so much experience in windows application.. at that time i have gone through internet
for Value Filed property of Controls in windows application. but i haven't find any link then i have gone through Property windows of Radio Button (any control).then  I used that TAG property
like a value field as we are using in web application.
            I used it in one of my desktop application.see this one of the step of XML Operation(XMLNodeIterator)

for eg.
             rbButton.Tag = (object)xNodeIterator.Current.GetAttribute("ansId", "");&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-483755005790006235?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/483755005790006235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2008/09/in-windows-application-tag-property-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/483755005790006235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/483755005790006235'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2008/09/in-windows-application-tag-property-of.html' title='In Windows application Tag Property of radio button (controls) is useful as like value field of controls in web Application'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-5430067638956663158</id><published>2008-09-24T03:23:00.000-07:00</published><updated>2008-09-24T03:38:52.847-07:00</updated><title type='text'>How to get motherboard serial number, Processor ID, VolumeSerialNumber using C#?</title><content type='html'>Add &lt;span style="color: rgb(51, 51, 255);"&gt;using System.Management;&lt;/span&gt; namespace in your application

then
//Get motherboard's serial number         
ManagementObjectSearcher mbs = new ManagementObjectSearcher("Select * From Win32_BaseBoard");
          foreach (ManagementObject mo in mbs.Get())
          {
              textBox1.Text = mo["SerialNumber"].ToString();
          }

          //Get Processor's Identity       
          mbs = new ManagementObjectSearcher("Select * From Win32_processor");         
          foreach (ManagementObject mo in mbs.Get())
          {
              textBox2.Text = mo["ProcessorID"].ToString();
          }

          //Get Network Adapter Configuration
          mbs = new ManagementObjectSearcher("Select * From Win32_NetworkAdapterConfiguration");       
          foreach (ManagementObject mo in mbs.Get())
          {            
              textBox3.Text = mo["MACAddress"].ToString();
              break;
          }

          //Get Network Adapter Configuration
          mbs = new ManagementObjectSearcher("Select * From win32_logicaldisk");         
          foreach (ManagementObject mo in mbs.Get())
          {
              textBox4.Text = mo["VolumeSerialNumber"].ToString();
          }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-5430067638956663158?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/5430067638956663158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2008/09/how-to-get-motherboard-serial-number.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/5430067638956663158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/5430067638956663158'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2008/09/how-to-get-motherboard-serial-number.html' title='How to get motherboard serial number, Processor ID, VolumeSerialNumber using C#?'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-745694213393115630</id><published>2008-06-03T02:43:00.000-07:00</published><updated>2012-01-20T05:59:38.112-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>Building and Consuming XML web services</title><content type='html'>&lt;span style="font-weight: bold; font-family: verdana;"&gt;Creating Web Service&lt;/span&gt;

using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;


[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]


public class HelloHeader : SoapHeader
{
    public string Username;
    public string Password;
}

public class HelloSoapHeader : System.Web.Services.WebService
{
    public HelloHeader myHeader;


    [WebMethod]
    [SoapHeader("myHeader")]
    public string HelloWorld()
    {
        System.Threading.Thread.Sleep(1000);
        if (myHeader == null)
            return "Hello World";
        else
            return "Hello " + myHeader.Username + " Your Password is :" + myHeader.Password;
    }

}


&lt;span style="font-weight: bold; font-family: verdana;"&gt;Consumming web service Synchronously&lt;/span&gt;


using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class ConsumeSynchronously : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        localhost.HelloHeader wsHeader = new localhost.HelloHeader();
        localhost.HelloSoapHeader ws = new localhost.HelloSoapHeader();

        wsHeader.Username = "Milind Mahajan";
        wsHeader.Password = "just testing";
        ws.HelloHeaderValue = wsHeader;
        ws.SoapVersion = System.Web.Services.Protocols.SoapProtocolVersion.Soap12;

        Label1.Text = ws.HelloWorld();
    }
}



&lt;span style="font-weight: bold; font-family: verdana;"&gt;Consumming web service Asynchronously&lt;/span&gt;


using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class ConsumeASynchronously : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        localhost.HelloHeader wsHeader = new localhost.HelloHeader();
        localhost.HelloSoapHeader ws = new localhost.HelloSoapHeader();

        wsHeader.Username = "Milind Mahajan";
        wsHeader.Password = "just testing";
        ws.HelloHeaderValue = wsHeader;
        ws.SoapVersion = System.Web.Services.Protocols.SoapProtocolVersion.Soap12;
        //AsyncCallback cb = new AsyncCallback(ServiceCallback);
        IAsyncResult myIar;
        myIar = ws.BeginHelloWorld(null,null);

        int x = 0;
        while (myIar.IsCompleted == false)
        {
            x += 1;
        }

        Label1.Text = "Result from web service: " + ws.EndHelloWorld(myIar) + " Local Count While Waiting : " + x.ToString();
    }

    //private void ServiceCallback(IAsyncResult ar)
    //{
    //    // Cast the AsyncState object to the proxy object
    //    localhost.HelloSoapHeader ws = (localhost.HelloSoapHeader)ar.AsyncState;
    //    // Call the End method and assign the response to a DataSet
    //    //Use the lock statement to prevent other threads from accessing
    //    //the listview until you have finished updating it
    //    string str = ws.EndHelloWorld(ar);
    //    lock (this.Label1)
    //    {
    //        Label1.Text = str;
    //    }
    //}


}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-745694213393115630?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/745694213393115630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2008/06/building-and-consuming-xml-web-services.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/745694213393115630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/745694213393115630'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2008/06/building-and-consuming-xml-web-services.html' title='Building and Consuming XML web services'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-8779269130365416031</id><published>2008-03-07T01:49:00.000-08:00</published><updated>2012-01-20T05:59:38.115-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>Web page execution</title><content type='html'>&lt;span class="v11" id="lblDescription" style="color: darkblue;"&gt;This article is copied from &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.c-sharpcorner.com/UploadFile/hima_.net/WebPageExecutioninIIS05162006054117AM/WebPageExecutioninIIS.aspx"&gt;http://www.c-sharpcorner.com/UploadFile/hima_.net/WebPageExecutioninIIS05162006054117AM/WebPageExecutioninIIS.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="v11" style="color: darkblue;"&gt;How the Simple Web page execution Happens?&lt;br /&gt;
&lt;br /&gt;
As All of us know A Request comes from Client (Browser) and sends to Server (We call it as Web server) in turn Server Process the Request and sends response Back to the Client in according to the client Request&lt;br /&gt;
&lt;br /&gt;
But internally in the Web server there is quite interesting process that happens. To get aware of that process we should first of all know about the architecture of the IIS&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It mainly consists of 3 Parts/Files&lt;br /&gt;
&lt;br /&gt;
1. Inetinfo.exec&lt;br /&gt;
&lt;br /&gt;
2. ISAPI Filter (Container for Internet Server Application Interface dlls) ,&lt;br /&gt;
&lt;br /&gt;
3. Worker Process (aspnet_wp.exe)&lt;/span&gt;&lt;br /&gt;
&lt;h2&gt;When ever a Request comes from the Client:&lt;/h2&gt;&lt;br /&gt;
Inetinfo.exe is the ASP.Net Request Handler that handles the requests from the client .If it’s for static resources like HTML files or image files inetinfo.exe process the request and sent to client If the request is with extension aspx/asp inetinfo.exe processes the request to API filter. ISAPI filter will have several runtime modules called as ISAPI extensions. To process the request ISAPI filter takes the help of these runtime modules .The runtime module loaded for asp page is asp.dll. And for asp.net page it’s ASPNET_ISAPI.dll. From here the request is processed o the Worker Process. Worker Process will have several Application Domains&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Application Domain&lt;/h2&gt;&lt;br /&gt;
The purpose of the Application Domain is in order to isolate one application from another. When ever we create a new application, application Domains are created automatically by the CLRHost. Worker process will create a block of memory related to particular application. Application domains provide a more secure and versatile unit of processing that the common language runtime can use to provide isolation between applications. Application domains are normally created by runtime hosts. Runtime host is responsible for bootstrapping the common language runtime before an application is run.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Worker process sends the request to HTTPPIPE line.(HTTP Pipeline is nonetheless collection of .net framework classes). HTTP Pipeline compiles the request into a library and -makes a call to HTTP runtime and Runtime creates an instance of page class&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class File : System.Web.UI.Page&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ASP.Net web page is a class derived from Page class ,this page class resides in system.web.dll&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After creating instance pf Page class HTTP Runtime immediately invokes Process Request Method of Page class&lt;br /&gt;
&lt;br /&gt;
Page Req = new Page();&lt;br /&gt;
&lt;br /&gt;
Req.ProcessRequest();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Process Request &lt;/b&gt;Method Does Following things&lt;br /&gt;
&lt;br /&gt;
1.Intialize the Memory&lt;br /&gt;
&lt;br /&gt;
2.Load the View State&lt;br /&gt;
&lt;br /&gt;
3.Page Execution and Post back Events&lt;br /&gt;
&lt;br /&gt;
4.Rendering HTML Content&lt;br /&gt;
&lt;br /&gt;
5.Releasing the memory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Process Request Method executes set of events for page class .These are calles as Page life cycle events.&lt;br /&gt;
&lt;h1&gt;Page Life Cycle Events&lt;/h1&gt;&lt;br /&gt;
Page_Init&lt;br /&gt;
The server controls are loaded and initialized from the Web form’s view state. This is the first step in a Web form’s life cycle.&lt;br /&gt;
&lt;br /&gt;
Page_Load&lt;br /&gt;
The server controls are loaded in the Page object. View state information is available at this point, so this is where you put code to change control settings or display text on the page.&lt;br /&gt;
&lt;br /&gt;
Page_PreRender&lt;br /&gt;
The application is about to render the Page object.&lt;br /&gt;
&lt;br /&gt;
Page_Unload&lt;br /&gt;
The page is unloaded from memory.&lt;br /&gt;
&lt;br /&gt;
Page_Disposed&lt;br /&gt;
The Page object is released from memory. This is the last event in the life of a Page object.&lt;br /&gt;
&lt;br /&gt;
Page_Error&lt;br /&gt;
An unhandled exception occurs.&lt;br /&gt;
&lt;br /&gt;
Page_AbortTransaction&lt;br /&gt;
A transaction is aborted.&lt;br /&gt;
&lt;br /&gt;
Page_CommitTransaction&lt;br /&gt;
A transaction is accepted.&lt;br /&gt;
&lt;br /&gt;
Page_DataBinding&lt;br /&gt;
A server control on the page binds to a data source. &lt;br /&gt;
&lt;br /&gt;
Process Request Method finally renders HTML Page&lt;br /&gt;
&lt;h1&gt;Dependencies:&lt;/h1&gt;&lt;br /&gt;
&lt;br /&gt;
When the request comes to ASP.net worker Process, it will be forwarded to HTTP Application factory. This Application Factory will maintain address of the Application Domains which are currently executing under worker process. If the required virtual directory application domain is unavailable it will create a new Application Domain. If the application domain is already existent, the request will be forwarded to Corresponding AppDomain.&lt;br /&gt;
&lt;br /&gt;
Application Domain maintains Page handler factory class. This will contain all libraries addresses corresponding to webpage. If the requested webpage library is available the instance of the page class is created, if the library is unavailable the request will be forwarded to http pipeline.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-8779269130365416031?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/8779269130365416031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2008/03/web-page-execution.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/8779269130365416031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/8779269130365416031'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2008/03/web-page-execution.html' title='Web page execution'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-4166796059984833445</id><published>2008-01-30T03:21:00.001-08:00</published><updated>2012-01-20T05:59:38.100-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>asp.net questions</title><content type='html'>&lt;ol&gt;&lt;li&gt;              &lt;b&gt;What do I need to create and run an ASP.NET application?&lt;/b&gt;             &lt;/li&gt;&lt;/ol&gt;            &lt;ul&gt;&lt;li&gt;             Windows 2000, Windows Server 2003 or Windows XP.             &lt;/li&gt;&lt;li&gt;              ASP.NET, which can be either the redistributable (included in the .NET SDK) or               Visual Studio .NET.             &lt;/li&gt;&lt;/ul&gt;            &lt;ol&gt;&lt;li&gt;              &lt;b&gt;Where can I download the .NET SDK?&lt;/b&gt;              &lt;p&gt;.NET SDK can be obtained &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9B3A2CA6-3647-4070-9F41-A333C6B9181D&amp;amp;displaylang=en" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;              &lt;p&gt;(You have to install the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=262D25E3-F589-4842-8157-034D1E7CF3A3&amp;amp;displaylang=en" target="_blank"&gt;Microsoft .NET Framework Version 1.1 Redistributable Package&lt;/a&gt;               before installing the .NET SDK.)&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;Are there any free IDEs for the .NET SDK?&lt;/b&gt;              &lt;ul&gt;&lt;li&gt;                Microsoft provides Visual Studio 2005 Express Edition Beta for free. Of                 particular interest to the ASP.NET developers would be the Visual Web Developer                 2005 Express Edition Beta 2 available &lt;a href="http://lab.msdn.microsoft.com/express/vwd/default.aspx" target="_blank"&gt;                 as a free download&lt;/a&gt;.               &lt;/li&gt;&lt;li&gt;                The ASP.NET Web Matrix Project (supported by Microsoft) is a free IDE for                 developing ASP.NET applications and is available &lt;a href="http://www.asp.net/WebMatrix/" target="_blank"&gt;                 here&lt;/a&gt;.               &lt;/li&gt;&lt;li&gt;                There is also a free open-source UNIX version of the Microsoft .NET development                 platform called Mono available for download &lt;a href="http://www.mono-project.com/Main_Page" target="_blank"&gt;                 here&lt;/a&gt;.               &lt;/li&gt;&lt;li&gt;                Another increasingly popular Open Source Development Environment for .NET is                 the #develop (short for SharpDevelop) available for download &lt;a href="http://www.icsharpcode.net/OpenSource/SD/" target="_blank"&gt;                 here&lt;/a&gt;.               &lt;/li&gt;&lt;/ul&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;When was ASP.NET released?&lt;/b&gt;              &lt;p&gt;ASP.NET is a part of the .NET framework which was released as a software                platform in 2002.&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;Is a new version coming up?&lt;/b&gt;              &lt;p&gt;ASP.NET 2.0, Visual Studio 2005 (Whidbey), Visual Web Developer 2005 Express                Edition are the next releases of Microsoft's Web platform and tools. They have                already been released as Beta versions. They are scheduled to be released in                the week of November 7, 2005.&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;Explain Namespace.&lt;/b&gt;              &lt;p&gt;Namespaces are logical groupings of names used within a program. There may be                multiple namespaces in a single application code, grouped based on the                identifiers’ use. The name of any given identifier must appear only once in its                namespace.&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;List the types of Authentication supported by ASP.NET.&lt;/b&gt;              &lt;ul&gt;&lt;li&gt;               Windows (default)               &lt;/li&gt;&lt;li&gt;               Forms               &lt;/li&gt;&lt;li&gt;               Passport               &lt;/li&gt;&lt;li&gt;                None (Security disabled)               &lt;/li&gt;&lt;/ul&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;What is CLR?&lt;/b&gt;              &lt;p&gt;Common Language Runtime (CLR) is a run-time environment that manages the                execution of .NET code and provides services like memory management, debugging,                security, etc. The CLR is also known as Virtual Execution System (VES).&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;What is CLI?&lt;/b&gt;              &lt;p&gt;The CLI is a set of specifications for a runtime environment, including a common                type system, base class library, and a machine-independent intermediate code                known as the Common Intermediate Language (CIL). (Source: Wikipedia.)&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;List the various stages of Page-Load lifecycle.&lt;/b&gt;              &lt;ul&gt;&lt;li&gt;                &lt;code&gt;Init()&lt;/code&gt;               &lt;/li&gt;&lt;li&gt;                &lt;code&gt;Load()&lt;/code&gt;               &lt;/li&gt;&lt;li&gt;                &lt;code&gt;PreRender()&lt;/code&gt;               &lt;/li&gt;&lt;li&gt;                &lt;code&gt;Unload()&lt;/code&gt;               &lt;/li&gt;&lt;/ul&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;Explain Assembly and Manifest.&lt;/b&gt;              &lt;p&gt;An assembly is a collection of one or more files and one of them (DLL or EXE)                contains a special metadata called Assembly Manifest. The manifest is stored as                binary data and contains details like versioning requirements for the assembly,                the author, security permissions, and list of files forming the assembly. An                assembly is created whenever a DLL is built. The manifest can be viewed                programmatically by making use of classes from the &lt;code&gt;System.Reflection&lt;/code&gt;               namespace. The tool Intermediate Language Disassembler (ILDASM) can be used for                this purpose. It can be launched from the command prompt or via Start&gt; Run.&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;What is Shadow Copy?&lt;/b&gt;              &lt;p&gt;In order to replace a COM component on a live web server, it was necessary to                stop the entire website, copy the new files and then restart the website. This                is not feasible for the web servers that need to be always running. .NET                components are different. They can be overwritten at any time using a mechanism                called Shadow Copy. It prevents the Portable Executable (PE) files like DLLs                and EXEs from being locked. Whenever new versions of the PEs are released, they                are automatically detected by the CLR and the changed components will be                automatically loaded. They will be used to process all new requests not                currently executing, while the older version still runs the currently executing                requests. By bleeding out the older version, the update is completed.&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;What is DLL Hell?&lt;/b&gt;              &lt;p&gt;DLL hell is the problem that occurs when an installation of a newer application                might break or hinder other applications as newer DLLs are copied into the                system and the older applications do not support or are not compatible with                them. .NET overcomes this problem by supporting multiple versions of an                assembly at any given time. This is also called side-by-side component                versioning.&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;Explain Web Services.&lt;/b&gt;              &lt;p&gt;Web services are programmable business logic components that provide access to                functionality through the Internet. Standard protocols like HTTP can be used to                access them. Web services are based on the Simple Object Access Protocol                (SOAP), which is an application of XML. Web services are given the &lt;i&gt;.asmx&lt;/i&gt;                extension.&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;Explain Windows Forms.&lt;/b&gt;              &lt;p&gt;Windows Forms is employed for developing Windows GUI applications. It is a class                library that gives developers access to Windows Common Controls with rich                functionality. It is a common GUI library for all the languages supported by                the .NET Framework.&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;What is Postback?&lt;/b&gt;              &lt;p&gt;When an action occurs (like button click), the page containing all the controls                within the &lt;code lang="html"&gt;&lt;form...&gt;&lt;/code&gt; tag performs an HTTP POST,                while having itself as the target URL. This is called Postback.&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;Explain the differences between server-side and client-side code?&lt;/b&gt;              &lt;p&gt;Server side scripting means that all the script will be executed by the server                and interpreted as needed. Client side scripting means that the script will be                executed immediately in the browser such as form field validation, clock, email                validation, etc. Client side scripting is usually done in VBScript or                JavaScript. Since the code is included in the HTML page, anyone can see the                code by viewing the page source. It also poses as a possible security hazard                for the client computer.&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;Enumerate the types of Directives.&lt;/b&gt;              &lt;ul&gt;&lt;li&gt;                &lt;code lang="aspnet"&gt;@ Page&lt;/code&gt;               directive               &lt;/li&gt;&lt;li&gt;                &lt;code lang="aspnet"&gt;@ Import&lt;/code&gt;               directive               &lt;/li&gt;&lt;li&gt;                &lt;code lang="aspnet"&gt;@ Implements&lt;/code&gt;               directive               &lt;/li&gt;&lt;li&gt;                &lt;code lang="aspnet"&gt;@ Register&lt;/code&gt;               directive               &lt;/li&gt;&lt;li&gt;                &lt;code lang="aspnet"&gt;@ Assembly&lt;/code&gt;               directive               &lt;/li&gt;&lt;li&gt;                &lt;code lang="aspnet"&gt;@ OutputCache&lt;/code&gt;               directive               &lt;/li&gt;&lt;li&gt;                &lt;code lang="aspnet"&gt;@ Reference&lt;/code&gt; directive               &lt;/li&gt;&lt;/ul&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;What is Code-Behind?&lt;/b&gt;              &lt;p&gt;Code-Behind is a concept where the contents of a page are in one file and the                server-side code is in another. This allows different people to work on the                same page at the same time and also allows either part of the page to be easily                redesigned, with no changes required in the other. An &lt;code lang="aspnet"&gt;Inherits&lt;/code&gt;               attribute is added to the &lt;code lang="aspnet"&gt;@ Page&lt;/code&gt; directive to                specify the location of the Code-Behind file to the ASP.NET page.&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;Describe the difference between inline and code behind.&lt;/b&gt;              &lt;p&gt;Inline code is written along side the HTML in a page. There is no separate                distinction between design code and logic code. Code-behind is code written in                a separate file and referenced by the &lt;i&gt;.aspx&lt;/i&gt; page.&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;List the ASP.NET validation controls?&lt;/b&gt;              &lt;ul&gt;&lt;li&gt;                &lt;code&gt;RequiredFieldValidator&lt;/code&gt;               &lt;/li&gt;&lt;li&gt;                &lt;code&gt;RangeValidator&lt;/code&gt;               &lt;/li&gt;&lt;li&gt;                &lt;code&gt;CompareValidator&lt;/code&gt;               &lt;/li&gt;&lt;li&gt;                &lt;code&gt;RegularExpressionValidator&lt;/code&gt;               &lt;/li&gt;&lt;li&gt;                &lt;code&gt;CustomValidator&lt;/code&gt;               &lt;/li&gt;&lt;li&gt;                &lt;code&gt;ValidationSummary&lt;/code&gt;               &lt;/li&gt;&lt;/ul&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;What is Data Binding?&lt;/b&gt;              &lt;p&gt;Data binding is a way used to connect values from a collection of data (e.g. &lt;code&gt;DataSet&lt;/code&gt;)                to the controls on a web form. The values from the dataset are automatically                displayed in the controls without having to write separate code to display                them.&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;Describe Paging in ASP.NET.&lt;/b&gt;              &lt;p&gt;The &lt;code&gt;DataGrid&lt;/code&gt; control in ASP.NET enables easy paging of the data.                The &lt;code&gt;AllowPaging&lt;/code&gt; property of the &lt;code&gt;DataGrid&lt;/code&gt; can be set                to &lt;code&gt;True&lt;/code&gt; to perform paging. ASP.NET automatically performs paging                and provides the hyperlinks to the other pages in different styles, based on                the property that has been set for &lt;code&gt;PagerStyle.Mode&lt;/code&gt;.&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;Should user input data validation occur server-side or client-side? Why?&lt;/b&gt;              &lt;p&gt;All user input data validation should occur on the server and minimally on the                client-side, though it is a good way to reduce server load and network traffic                because we can ensure that only data of the appropriate type is submitted from                the form. It is totally insecure. The user can view the code used for                validation and create a workaround for it. Secondly, the URL of the page that                handles the data is freely visible in the original form page. This will allow                unscrupulous users to send data from their own forms to your application.                Client-side validation can sometimes be performed where deemed appropriate and                feasible to provide a richer, more responsive experience for the user.&lt;/p&gt;             &lt;/li&gt;&lt;li&gt;              &lt;b&gt;What is the difference between Server.Transfer and Response.Redirect?&lt;/b&gt;              &lt;ul&gt;&lt;li&gt;                &lt;b&gt;&lt;code&gt;Response.Redirect&lt;/code&gt;&lt;/b&gt;: This tells the browser that the                requested page can be found at a new location. The browser then initiates                another request to the new page loading its contents in the browser. This                results in two requests by the browser.               &lt;/li&gt;&lt;li&gt;                &lt;b&gt;&lt;code&gt;Server.Transfer&lt;/code&gt;&lt;/b&gt;: It transfers execution from the first page                 to the second page on the server. As far as the browser client is concerned, it                 made one request and the initial page is the one responding with content. The                 benefit of this approach is one less round trip to the server from the client                 browser. Also, any posted form variables and query string parameters are                 available to the second page as well.               &lt;/li&gt;&lt;/ul&gt;             &lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-4166796059984833445?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/4166796059984833445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2008/01/aspnet-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/4166796059984833445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/4166796059984833445'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2008/01/aspnet-questions.html' title='asp.net questions'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-4938057828957875851</id><published>2008-01-28T01:34:00.001-08:00</published><updated>2012-01-20T05:59:38.109-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>Web Services</title><content type='html'>&lt;span class="style6"  style="font-family:trebuchet ms;"&gt;&lt;strong&gt;Asp Net Web Services&lt;/strong&gt;: Here are some&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; &lt;/span&gt;&lt;span class="style6"  style="font-family:trebuchet ms;"&gt;web services  interview questions&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; &lt;/span&gt;&lt;span class="style6"  style="font-family:trebuchet ms;"&gt;which is very helpful in interviews. This great listing of interview questions provides a lot of information on Web Services Questions and Web Services Faqs. Not at all, instead of &lt;b&gt;web services faqs&lt;/b&gt; and &lt;b&gt;interview questions&lt;/b&gt; you can also learn how to use web services in asp net. If you need more &lt;b&gt;web services faqs&lt;/b&gt; used in asp net you can also contact us for more info।

&lt;/span&gt;&lt;span class="style11"  style="font-family:trebuchet ms;"&gt;Question: Can you define basic element of WebServices and explain any one from them?&lt;/span&gt;
         &lt;span class="style11"  style="font-family:trebuchet ms;"&gt;Answer:&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; &lt;/span&gt;&lt;span class="style6"  style="font-family:trebuchet ms;"&gt;These are as follows SOAP, WSDL and UDDI. And I am explaining about the SOAP(Simple Object Access Protocol) it is a communication protocol it is for communication between application it is platform and language independent.It is based on XML and also help to get from Firwall.&lt;/span&gt;
       
         &lt;span class="style11"  style="font-family:trebuchet ms;"&gt; Question: Explain functioning of Web Services Protocols  ?&lt;/span&gt;
         &lt;span class="style11"  style="font-family:trebuchet ms;"&gt;Answer:&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; &lt;/span&gt;&lt;span class="style6"  style="font-family:trebuchet ms;"&gt;&lt;b&gt;Http-Get:&lt;/b&gt;- This is standard protocol that helps client to communicate with server with HTTP.When client send a request to server via HTTP request and reuired parameter are attached with the querystring.Example:-
http://www.dotnetquestion.info/dotnet/interview.aspx?id=pervej&amp;amp;cast=munjal and we get the value from querystring.
Request.querystring("id")
Request.querystring("cast").

&lt;b&gt;Http-Post&lt;/b&gt;:-This is same as Http-Get but the diffrence is that in place of sending parameters onto the URL information is send with HTTP request message with some extra information which contains Parameters and their values.This Protocols is limited to sending name/value pairs.
&lt;/span&gt;
&lt;span class="style6"&gt;&lt;b&gt;SOAP&lt;/b&gt;:-The only diffrence is that its relies on the XML as compares to Http-Get,Http-Post.SOAP can send not only the name/value pairs but also some complex object also as for example datatypes,class,objects.SOAP can also uses request/reponse model as Http-Get,Http-post but it is not limited to Request/Response it can also send types of message.Because its uses XML that is pure text so firewalls not created so much problem because its easily converted in to HTML. .&lt;/span&gt;

     &lt;span style="font-weight: bold;" class="style11"&gt;      Question: Why do some web service classes derive from  System.Web.WebServices while others do not ?&lt;/span&gt;
    &lt;span class="style11"&gt;Answer:&lt;/span&gt; &lt;span class="style6"&gt;Those asp net Web Service classes which employ objects like Application, Session, Context, Server, and User have to derive from System।Web.WebServices. If it does not use these objects, it is not necessary to be derived from it.

&lt;/span&gt;&lt;span style="font-weight: bold;" class="style11"&gt;Question: What is WSDL ?&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;
&lt;strong class="style11"&gt;Answer: &lt;/strong&gt;&lt;span class="style6"&gt;WSDL is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information. The operations and messages are described abstractly, and then bound to a concrete network protocol and message format to define an endpoint. Related concrete endpoints are combined into abstract endpoints (services). (Source: www.w3.org).

&lt;strong&gt;Question: What is the standard you use to wrap up a call  to a Web service ?&lt;/strong&gt;
&lt;strong&gt;Answer:&lt;/strong&gt; HTTP with SOAP.

&lt;strong&gt;Question: What is Asp Net Web Services ?&lt;/strong&gt;
&lt;strong&gt;Answer: &lt;/strong&gt;Web services are programmable business logic components that provide access to functionality through the Internet. Standard protocols like HTTP can be used to access them. Web services are based on the Simple Object Access Protocol (SOAP), which is an application of XML. Web services are given the .asmx extension..

&lt;span style="font-weight: bold;" class="style11"&gt;Question: Define Protocols that helps Web Services in Asp Net?&lt;/span&gt;
        &lt;span class="style11"&gt;Answer:&lt;/span&gt; &lt;span class="style6"&gt;From my point of view Web Services used three protocols for interacting with the clients.Http-Post,Http-Get,SOAP.&lt;/span&gt;
     
&lt;strong&gt;Question: What are VSDISCO files ?
Answer:&lt;/strong&gt; VSDISCO files are DISCO files that enable dynamic discovery of Web Services. ASP.NET links the VSDISCO to a HTTP handler that scans the host directory and subdirectories for ASMX and DISCO files and returns a dynamically generated DISCO document. A client who requests a VSDISCO file gets back what appears to be a static DISCO document.

&lt;/span&gt;&lt;span class="style11"&gt;&lt;span style="font-weight: bold;"&gt;Question: What is UDDI ?&lt;/span&gt;
&lt;/span&gt;&lt;span class="style6"&gt;&lt;strong&gt;Answer&lt;/strong&gt;&lt;/span&gt;&lt;span class="style11"&gt;:&lt;/span&gt;&lt;span class="style6"&gt; UDDI stands for Universal Description, Discovery, and Integration. It is like an "Yellow Pages" for Web Services. It is maintained by Microsoft, IBM, and Ariba, and is designed to provide detailed information regarding registered Web Services for all vendors. The UDDI can be queried for specific Web Services.

&lt;/span&gt;&lt;span class="style11"&gt;&lt;span style="font-weight: bold;"&gt;Question: Is it possible to generate the source code for  an ASP.NET Web service from a WSDL ?&lt;/span&gt;
Answer:&lt;/span&gt;&lt;span class="style6"&gt; The Wsdl.exe tool (.NET Framework SDK) can be used to  generate source code for an ASP.NET web service with its WSDL link.
&lt;/span&gt;&lt;span class="style11"&gt;Example:&lt;/span&gt;&lt;span class="style6"&gt; wsdl /server http://api।google.com/GoogleSearch.wsdl.

&lt;/span&gt;&lt;span class="style11"&gt;&lt;span style="font-weight: bold;"&gt;Question: Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component ? &lt;/span&gt;
&lt;/span&gt;&lt;span class="style6"&gt;&lt;strong&gt;Answer&lt;/strong&gt;&lt;/span&gt;&lt;span class="style11"&gt;:&lt;/span&gt;&lt;span class="style6"&gt; When to Use Asp Net Web Services:
&lt;strong&gt; (i)&lt;/strong&gt;Communicating through a Firewall When building a distributed application with 100s/1000s of users spread over multiple locations, there is always the problem of communicating between client and server because of firewalls and proxy servers. Exposing your middle tier components as Web Services and invoking the directly from a Windows UI is a very valid option.

&lt;strong&gt; (ii)&lt;/strong&gt;Application Integration When integrating applications written in various languages and running on disparate systems. Or even applications running on the same platform that have been written by separate vendors.

&lt;strong&gt; (iii)&lt;/strong&gt;Business-to-Business Integration This is an enabler for B2B intergtation which allows one to expose vital business processes to authorized supplier and customers. An example would be exposing electronic ordering and invoicing, allowing customers to send you purchase orders and suppliers to send you invoices electronically.

&lt;strong&gt; (iv)&lt;/strong&gt;Software Reuse This takes place at multiple levels. Code Reuse at the Source code level or binary componet-based resuse. The limiting factor here is that you can reuse the code but not the data behind it. Webservice overcome this limitation. A scenario could be when you are building an app that aggregates the functionality of serveral other Applicatons. Each of these functions could be performed by individual apps, but there is value in perhaps combining the the multiple apps to present a unifiend view in a Portal or Intranet.

&lt;/span&gt;&lt;span class="style11"&gt;&lt;span style="font-weight: bold;"&gt;Question: What are Service Oriented Architectures (SOA) ? &lt;/span&gt;
&lt;/span&gt;&lt;span class="style6"&gt;&lt;strong&gt;Answer&lt;/strong&gt;&lt;/span&gt;&lt;span class="style11"&gt;:&lt;/span&gt;&lt;span class="style6"&gt; SOA describes an information technology architecture that enables distributed computing environments with many different types of computing platforms and applications. Web services in asp net are one of the technologies that help make SOAs possible. As a concept, SOA has been around since the 1980s, but many early IT technologies failed to achieve the goal of linking different types of applications and systems. By making early investments with .NET, Microsoft has helped provide the building blocks that today are putting many enterprise customers on the path to successfully implementing SOAs. With SOAs, companies can benefit from the unimpeded flow of information that is the hallmark of connected systems.

&lt;/span&gt;&lt;span class="style11"&gt;&lt;span style="font-weight: bold;"&gt;Question: What is .NET Passport ?&lt;/span&gt;
&lt;/span&gt;&lt;span class="style6"&gt;&lt;strong&gt;Answer&lt;/strong&gt;&lt;/span&gt;&lt;span class="style11"&gt;:&lt;/span&gt;&lt;span class="style6"&gt; .NET Passport is a Web-based service that is designed to make signing in to Web sites fast and easy. Passport enables participating sites to authenticate a user with a single set of sign-in credentials, alleviating the need for users to remember numerous passwords and user names.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-4938057828957875851?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/4938057828957875851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2008/01/web-services.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/4938057828957875851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/4938057828957875851'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2008/01/web-services.html' title='Web Services'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-1135081902952106824</id><published>2008-01-28T01:17:00.004-08:00</published><updated>2012-01-20T05:59:38.089-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'></title><content type='html'>&lt;p style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;" nd="4"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;Remoting is the process through which we can access any remote object from one application domain to another application domain. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;" nd="5"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;For creating remote object the class object must be inherited by MarshalByRefObject class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;" nd="6"&gt;&lt;span style="font-size:85%;"&gt;
&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;Application domain  is the runtime environment of application, For MicrosoftWord, domain is MS office, For .NET programme, .NET runtime environment.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Terms Used in Remoting&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul type="1"&gt;&lt;span style="font-size:85%;"&gt;&lt;li class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span&gt;&lt;strong&gt;Proxy:&lt;/strong&gt; To avoid conjunction in networking. Main work is task Distributing.There are two type of proxy.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;" nd="8"&gt;

&lt;ul&gt;&lt;li type="disc"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;Transparent proxy (There is no physical existence , Created by IIS &lt;/span&gt;&lt;a class="iAs" style="border-bottom: 0.07em solid darkgreen; font-weight: normal; font-size: 100%; padding-bottom: 1px; color: darkgreen; background-color: transparent; text-decoration: underline;" href="http://www.dotnetheaven.com/UploadFile/rahul4_saxena/Remoting04202007014138AM/Remoting.aspx?ArticleID=cea55e9a-7e59-44a1-b5ad-0fd6f2a03537#" target="_blank" itxtdid="3674842"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;server&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;) &lt;/span&gt; &lt;/li&gt;&lt;li type="disc"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;Real Proxy  (Physical Existence)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;&lt;li class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;Channel&lt;em&gt;: &lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;" nd="9"&gt;Channel provides the medium for transfer data from one location to another location. There  are two types of channel.
&lt;/span&gt;
&lt;/span&gt; &lt;ul&gt;&lt;li type="disc"&gt; &lt;div class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;" nd="10"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;TCP(work with Predefined root Connection oriented) &lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;/li&gt;&lt;li type="disc"&gt; &lt;div class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;" nd="10"&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;HTTP (No need predefined root)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;/span&gt;&lt;/ul&gt; &lt;ol style="margin-top: 0in;" start="3" type="1"&gt;&lt;span style="font-size:85%;"&gt;&lt;li class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;Formatters:&lt;em&gt; &lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;" nd="11"&gt;Change the data in an appropriate format that it can traverse through channels.

&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;There are two types of formatters&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/span&gt;&lt;/ol&gt; &lt;ul&gt;&lt;span style="font-size:85%;"&gt;&lt;li&gt; &lt;div style="margin: 0in 0in 0pt 0.5in;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: 10pt; font-family: Symbol;"&gt;&lt;span style=""&gt;&lt;span style="font-family: 'Times New Roman'; 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;span style="font-size: 10pt; font-family: Verdana;"&gt;Binary &lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;/li&gt;&lt;li&gt; &lt;div style="margin: 0in 0in 0pt 0.5in;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;SOAP(Simple Object Access Protocol)&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt; &lt;ol style="margin-top: 0in;" start="4" type="1"&gt;&lt;span style="font-size:85%;"&gt;&lt;li class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;b&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;Sink:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;" nd="12"&gt;  Sink is used for security point of view. Before sending the data, the Data will be encrypted. Some additional bit will be added with the data to secure the data.

&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;There are two types of sink&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/span&gt;&lt;/ol&gt; &lt;ul&gt;&lt;span style="font-size:85%;"&gt;&lt;li&gt; &lt;div style="margin: 0in 0in 0pt 0.5in;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;Envoy sink &lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;/li&gt;&lt;li&gt; &lt;div style="margin: 0in 0in 0pt 0.5in;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;Server Context Sink&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;b&gt;Object Mode On Server: &lt;/b&gt;Two Types of Object Mode&lt;/span&gt; .&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul&gt;&lt;span style="font-size:85%;"&gt;&lt;li&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;SingleCall&lt;/span&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;Singleton&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;
&lt;a href="http://www.c-sharpcorner.com/UploadFile/rahul4_saxena/Remoting04252007233559PM/Remoting.aspx"&gt;&lt;span style="font-weight: bold;"&gt;application&lt;/span&gt;&lt;/a&gt;

&lt;ol start="1"&gt;&lt;li&gt;   &lt;b&gt;What is .NET Remoting?&lt;/b&gt;   &lt;p&gt;.NET Remoting is an   enabler for application communication. It is a generic system for   different applications to use to communicate with one another. .NET   objects are exposed to remote processes, thus allowing interprocess   communication.    &lt;/p&gt;  &lt;/li&gt;&lt;li&gt;   &lt;b&gt;What’s a Windows process?&lt;/b&gt;   &lt;p&gt;It’s an application that’s running and had been allocated memory.&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;   &lt;b&gt;What are the consideration in deciding to use .NET Remoting or ASP.NET Web Services?&lt;/b&gt;   &lt;p&gt;Remoting is a more efficient communication exchange when you can    control both ends of the application involved in the communication    process.  Web Services provide an open-protocol-based exchange of    informaion.  Web Services are best when you need to communicate with an    external organization or another (non-.NET) technology.   &lt;/p&gt;  &lt;/li&gt;&lt;li&gt;   &lt;b&gt;What are channels in .NET Remoting?&lt;/b&gt;   &lt;p&gt;Channels represent the objects that transfer the other serialized    objects from one application domain to another and from one computer to    another, as well as one process to another on the same box। A channel    must exist before an object can be ट्रांस्फेर्रेड.&lt;/p&gt; &lt;/li&gt;&lt;li&gt;   &lt;b&gt;What security measures exist for .NET Remoting in System.Runtime.Remoting?&lt;/b&gt;   &lt;p&gt;None. Security should be taken care of at the application level.    Cryptography and other security techniques can be applied at    application or server level.    &lt;/p&gt;  &lt;/li&gt;&lt;li&gt;   &lt;b&gt;What is a formatter?&lt;/b&gt;   &lt;p&gt;A formatter is an object that is responsible for encoding and    serializing data into messages on one end, and deserializing and    decoding messages into data on the other end.    &lt;/p&gt;  &lt;/li&gt;&lt;li&gt;   &lt;b&gt;Can you configure a .NET Remoting object via XML file?&lt;/b&gt;   &lt;p&gt;Yes, via machine.config and application level .config file (or    web.config in ASP.NET). Application-level XML settings take precedence    over machine.config.&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;   &lt;b&gt;Choosing between HTTP and TCP for protocols and Binary and SOAP for formatters, what are the trade-offs?&lt;/b&gt;   &lt;p&gt;    Binary over TCP is the most effiecient, SOAP over HTTP is the most interoperable.&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;   &lt;b&gt;How do you define the lease of the object?&lt;/b&gt;   &lt;p&gt; By implementing ILease interface when writing the class code.&lt;/p&gt;  &lt;/li&gt;&lt;li&gt;   &lt;b&gt;&lt;b&gt;What’s SingleCall activation mode used for?&lt;/b&gt;&lt;/b&gt;   &lt;p&gt;If the server object is instantiated for responding to just one single request, the request should be made in SingleCall mode.     &lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-1135081902952106824?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/1135081902952106824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2008/01/remoting-is-process-through-which-we.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/1135081902952106824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/1135081902952106824'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2008/01/remoting-is-process-through-which-we.html' title=''/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-3487279435570902364</id><published>2008-01-04T02:36:00.000-08:00</published><updated>2012-01-20T05:59:38.097-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>more asp.net  questiuons</title><content type='html'>ASP.Net Interview Questions
1. Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process.
inetinfo.exe is theMicrosoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .aspx extension), the ISAPI filter aspnet_isapi.dll takes care of it by passing the request tothe actual worker process aspnet_wp.exe.

2. What’s the difference between Response.Write() andResponse.Output.Write()?
Response.Output.Write() allows you to write formatted output.

3. What methods are fired during the page load?
Init() - when the page is instantiated
Load() - when the page is loaded into server memory
PreRender() - the brief moment before the page is displayed to the user as HTML
Unload() - when page finishes loading.

4. When during the page processing cycle is ViewState available?
After the Init() and before the Page_Load(), or OnLoad() for a control.

5. What namespace does the Web page belong in the .NET Framework class hierarchy?
System.Web.UI.Page

6. Where do you store the information about the user’s locale?
System.Web.UI.Page.Culture

7. What’s the difference between Codebehind="MyCode.aspx.cs" andSrc="MyCode.aspx.cs"?
CodeBehind is relevant to Visual Studio.NET only.

8. What’s a bubbled event?
When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.

9. Suppose you want a certain ASP.NET function executed on MouseOver for a certain button.  Where do you add an event handler?
Add an OnMouseOver attribute to the button.  Example: btnSubmit.Attributes.Add("onmouseover","someClientCodeHere();");

10. What data types do the RangeValidator control support?
Integer, String, and Date.

11. Explain the differences between Server-side and Client-side code?
Server-side code executes on the server.  Client-side code executes in the client's browser.

12. What type of code (server or client) is found in a Code-Behind class?
The answer is server-side code since code-behind is executed on the server.  However, during the code-behind's execution on the server, it can render client-side code such as JavaScript to be processed in the clients browser.  But just to be clear, code-behind executes on the server, thus making it server-side code.

13. Should user input data validation occur server-side or client-side?  Why?
All user input data validation should occur on the server at a minimum.  Additionally, client-side validation can be performed where deemed appropriate and feasable to provide a richer, more responsive experience for the user.

14. What is the difference between Server.Transfer and Response.Redirect?  Why would I choose one over the other?
Server.Transfer transfers page processing from one page directly to the next page without making a round-trip back to the client's browser.  This provides a faster response with a little less overhead on the server.  Server.Transfer does not update the clients url history list or current url.  Response.Redirect is used to redirect the user's browser to another page or site.  This performas a trip back to the client where the client's browser is redirected to the new page.  The user's browser history list is updated to reflect the new address.

15. Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?
Valid answers are:
•  A DataSet can represent an entire relational database in memory, complete with tables, relations, and views.
•  A DataSet is designed to work without any continuing connection to the original data source.
•  Data in a DataSet is bulk-loaded, rather than being loaded on demand.
•  There's no concept of cursor types in a DataSet.
•  DataSets have no current record pointer You can use For Each loops to move through the data.
•  You can store many edits in a DataSet, and write them to the original data source in a single operation.
•  Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources.

16. What is the Global.asax used for?
The Global.asax (including the Global.asax.cs file) is used to implement application and session level events.

17. What are the Application_Start and Session_Start subroutines used for?
This is where you can set the specific variables for the Application and Session objects.

18. Can you explain what inheritance is and an example of when you might use it?
When you want to inherit (use the functionality of) another class.  Example: With a base class named Employee, a Manager class could be derived from the Employee base class.

19. Whats an assembly?
Assemblies are the building blocks of the .NET framework. Overview of assemblies from MSDN

20. Describe the difference between inline and code behind.
Inline code written along side the html in a page. Code-behind is code written in a separate file and referenced by the .aspx page.

21. Explain what a diffgram is, and a good use for one?
The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML.  A good use is reading database data to an XML file to be sent to a Web Service.

22. Whats MSIL, and why should my developers need an appreciation of it if at all?
MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL.  MSIL also allows the .NET Framework to JIT compile the assembly on the installed computer.

23. Which method do you invoke on the DataAdapter control to load your generated dataset with data?
The Fill() method.

24. Can you edit data in the Repeater control?
No, it just reads the information from its data source.

25. Which template must you provide, in order to display data in a Repeater control?
ItemTemplate.

26. How can you provide an alternating color scheme in a Repeater control?
Use the AlternatingItemTemplate.

27. What property must you set, and what method must you call in your code, in order to bind the data from a data source to the Repeater control?
You must set the DataSource property and call the DataBind method.

28. What base class do all Web Forms inherit from?
The Page class.

29. Name two properties common in every validation control?
ControlToValidate property and Text property.

30. Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?
DataTextField property.

31. Which control would you use if you needed to make sure the values in two different controls matched?
CompareValidator control.

32. How many classes can a single .NET DLL contain?
It can contain many classes.

Web Service Questions
1. What is the transport protocol you use to call a Web service?
SOAP (Simple Object Access Protocol) is the preferred protocol.

2. True or False: A Web service can only be written in .NET?
False

3. What does WSDL stand for?
Web Services Description Language.

4. Where on the Internet would you look for Web services?
http://www.uddi.org

5. True or False: To test a Web service you must create a Windows application or Web application to consume this service?
False, the web service comes with a test page and it provides HTTP-GET method to test.

State Management Questions
1. What is ViewState?
ViewState allows the state of objects (serializable) to be stored in a hidden field on the page.  ViewState is transported to the client and back to the server, and is not stored on the server or any other external source.  ViewState is used the retain the state of server-side objects between postabacks.

2. What is the lifespan for items stored in ViewState?
Item stored in ViewState exist for the life of the current page.  This includes postbacks (to the same page).

3. What does the "EnableViewState" property do?  Why would I want it on or off?
It allows the page to save the users input on a form across postbacks.  It saves the server-side values for a given control into ViewState, which is stored as a hidden value on the page before sending the page to the clients browser.  When the page is posted back to the server the server control is recreated with the state stored in viewstate.

4. What are the different types of Session state management options available with ASP.NET?
ASP.NET provides In-Process and Out-of-Process state management.  In-Process stores the session in memory on the web server.  This requires the a "sticky-server" (or no load-balancing) so that the user is always reconnected to the same web server.  Out-of-Process Session state management stores data in an external data source.  The external data source may be either a SQL Server or a State Server service.  Out-of-Process state management requires that all objects stored in session are serializable.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6185090521451311774-3487279435570902364?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/3487279435570902364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2008/01/more-questiuons.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/3487279435570902364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/3487279435570902364'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2008/01/more-questiuons.html' title='more asp.net  questiuons'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-5462827658906855885</id><published>2008-01-04T02:34:00.000-08:00</published><updated>2012-01-20T06:00:59.601-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>oops questions</title><content type='html'>&lt;h1 style="line-height: 18pt;"&gt;OOPs questions&lt;/h1&gt;

&lt;h1 style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Inheritance&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h1&gt;  &lt;p class="MsoNormal" style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;The process of sub-classing a class to extend its functionality is called Inheritance.It provides idea of reusability.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h5 style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Order of Constructor execution in Inheritance &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h5&gt;  &lt;p class="MsoBodyText2" style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;constructors are called in the order from the top to the bottom (parent to child class) in inheritance hierarchy. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h5 style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Order of Destructor execution in Inheritance&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h5&gt;  &lt;p class="MsoNormal" style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;The destructors are called in the reverse order, i.e., from the bottom to the top (child to parent class) in the inheritance hierarchy.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 18pt;"&gt;&lt;b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;What are Sealed Classes in C#?
&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;The sealed modifier is used to prevent derivation from a class. A compile-time error occurs if a sealed class is specified as the &lt;a href="http://dng-oops.blogspot.com/" target="_top"&gt;&lt;span class="klink"&gt;base class&lt;/span&gt;&lt;/a&gt; of another class. (A sealed class cannot also be an abstract class) &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h1 style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Can you prevent your class from being inherited by another class?
&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51); font-weight: normal;"&gt;Yes. The keyword “sealed” will prevent the class from being inherited.&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;

Can you allow a class to be inherited, but prevent the method from being over-ridden?
&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51); font-weight: normal;"&gt;Yes. Just leave the class public and make the method sealed.&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h1&gt;  &lt;h1 style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Fast Facts of Inheritance&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h1&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;!--[if !supportLists]--&gt; Multiple inheritance of classes is not allowed in C#.&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;!--[if !supportLists]--&gt; In C# you can implements more than one interface, thus multiple inheritance is achieved through interface.&lt;!--[endif]--&gt;&lt;!--[if !supportLists]--&gt; The &lt;u&gt;Object class&lt;/u&gt; defined in the System namespace &lt;u&gt;is&lt;/u&gt; implicitly &lt;u&gt;the ultimate base class of all the classes in C#&lt;/u&gt; (and the .NET framework) &lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;!--[if !supportLists]--&gt; Structures (struct) in C# does not support inheritance, it can only implements interfaces.&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h1 style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Polymorphism&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h1&gt;  &lt;p class="MsoNormal" style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Polymorphism means same operation may behave differently on different classes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Eg: Method Overloading is an example of &lt;u&gt;Compile Time Polymorphism.&lt;/u&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Method Overriding is an example of &lt;u&gt;Run Time Polymorphism&lt;/u&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 18pt;"&gt;&lt;b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Does C#.net supports multiple inheritance?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;No. A class can inherit from only one base class, however a class can implements many interface, which servers some of the same purpose without increasing complexity.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 18pt;"&gt;&lt;b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;How many types of Access Modifiers.&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;!--[if !supportLists]--&gt;1) Public – Allows the members to be globally accessible.&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;!--[if !supportLists]--&gt;2) Private – Limits the member’s access to only the containing type.&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;!--[if !supportLists]--&gt;3) Protected – Limits the member’s access to the containing type and all classes derived from the containing type.&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;!--[if !supportLists]--&gt;4) Internal – Limits the member’s access to within the current project.&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h1 style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Method Overloading&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h1&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;!--[if !supportLists]--&gt; Method with same name but with different arguments is called method overloading.&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;!--[if !supportLists]--&gt; Method Overloading forms compile-time polymorphism.&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;!--[if !supportLists]--&gt; Eg:&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;class A1{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;void hello()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;{ Console.WriteLine(“Hello”); }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;void hello(string s)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;{ Console.WriteLine(“Hello {0}”,s); }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h1 style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Method Overriding&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h1&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;!--[if !supportLists]--&gt; Method overriding occurs when child class declares a method that has the same type arguments as a method declared by one of its superclass.&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;!--[if !supportLists]--&gt; Method overriding forms Run-time polymorphism.&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;!--[if !supportLists]--&gt; Note: By default functions are not virtual in C# and so you need to write “virtual” explicitly. While by default in Java each function are virtual.&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;!--[if !supportLists]--&gt; Eg1:&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Class parent&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;virtual &lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;void hello()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;{ Console.WriteLine(“Hello from Parent”); }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Class child : parent&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;override&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt; void hello()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;{ Console.WriteLine(“Hello from Child”); }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;static void main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;parent objParent = new child();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;objParent.hello();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;//Output&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Hello from Child.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h1 style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Virtual Method&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h1&gt;  &lt;p class="MsoNormal" style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;By declaring base class function as virtual, we allow the function to be overridden in any of derived class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Eg:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Class parent&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;virtual &lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;void hello()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;{ Console.WriteLine(“Hello from Parent”); }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Class child : parent&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;override&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt; void hello()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;{ Console.WriteLine(“Hello from Child”); }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;static void main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;parent objParent = new child();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;objParent.hello();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;//Output&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Hello from Child.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="line-height: 18pt;"&gt;&lt;b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;What is Interface&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 1.8pt; margin-left: 6pt; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: rgb(51, 51, 51);"&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="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;An Interface is a group of constants and method declaration. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 1.8pt; margin-left: 6pt; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: rgb(51, 51, 51);"&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="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;.Net supports multiple inheritance through Interface. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 1.8pt; margin-left: 6pt; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: rgb(51, 51, 51);"&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="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Interface states “what” to do, rather than “how” to do. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 1.8pt; margin-left: 6pt; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: rgb(51, 51, 51);"&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="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;An interface defines only the members that will be made available by an implementing object. The definition of the interface states nothing about the implementation of the members, only the parameters they take and the types of values they will return. Implementation of an interface is left entirely to the implementing class. It is possible, therefore, for different objects to provide dramatically different implementations of the same members. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 1.8pt; margin-left: 6pt; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: rgb(51, 51, 51);"&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&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Example1&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;, the Car object might implement the IDrivable interface (by convention, interfaces usually begin with I), which specifies the GoForward, GoBackward, and Halt methods. Other classes, such as Truck, Aircraft, Train or Boat might implement this interface and thus are able to interact with the Driver object. The Driver object is unaware of which interface implementation it is interacting with; it is only aware of the interface itself. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 1.8pt; margin-left: 6pt; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: rgb(51, 51, 51);"&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&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Example2&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;, an interface named IShape, which defines a single method CalculateArea. &lt;st1:street st="on"&gt;&lt;st1:address st="on"&gt;A   Circle&lt;/st1:address&gt;&lt;/st1:Street&gt; class implementing this interface will calculate its area differently than a Square class implementing the same interface. However, an object that needs to interact with an IShape can call the CalculateArea method in either a Circle or a Square and obtain a valid result. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 1.8pt; margin-left: 6pt; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: rgb(51, 51, 51);"&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&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Practical Example&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;public interface IDrivable
{
void GoForward(int Speed);
}

public class Truck : IDrivable
{
public void GoForward(int Speed)
{
// Implementation omitted
}
}

public class Aircraft : IDrivable
{
public void GoForward(int Speed)
{
// Implementation omitted
}
}

public class Train : IDrivable
{
public void GoForward(int Speed)
{
// Implementation omitted
}
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 18pt;"&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;
&lt;b&gt;Extra&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 1.8pt; margin-left: 6pt; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: rgb(51, 51, 51);"&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="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Each variable declared in interface must be assigned a constant value. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 1.8pt; margin-left: 6pt; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: rgb(51, 51, 51);"&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="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Every interface variable is implicitly public, static and final. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 1.8pt; margin-left: 6pt; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: rgb(51, 51, 51);"&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="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Every interface method is implicitly public and abstract. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 1.8pt; margin-left: 6pt; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: rgb(51, 51, 51);"&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="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Interfaces are allowed to extends other interfaces, but sub interface cannot define the methods declared in the super interface, as sub interface is still interface and not class. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 1.8pt; margin-left: 6pt; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: rgb(51, 51, 51);"&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="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;If a class that implements an interface does not implements all the methods of the interface, then the class becomes an abstract class and cannot be instantiated. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 1.8pt; margin-left: 6pt; text-indent: -0.25in; line-height: 18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 10pt; font-family: Symbol; color: rgb(51, 51, 51);"&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="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Both classes and structures can implement interfaces, including multiple interfaces.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;pre style="line-height: 18pt;"&gt;&lt;b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;In which Scenario you will go for Interface or Abstract Class?



&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 9pt; font-family: Verdana; color: rgb(51, 51, 51);"&gt;Interfaces, like classes, define a set of properties, methods, and events. But unlike classes, interfaces

do not provide implementation. They are implemented by classes, and defined as separate entities from

classes. Even though class inheritance allows your classes to inherit implementation from a base class, it

also forces you to make most of your design decisions when the class is first published.



Abstract classes are useful when creating components because they allow you specify an invariant level

of functionality in some methods, but leave the implementation of other methods until a specific

implementation of that class is needed. They also version well, because if additional functionality is

needed in derived classes, it can be added to the base class without breaking code.&lt;/span&gt;&lt;span style="font-family: Verdana; color: rgb(51, 51, 51);"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 9pt; font-family: Verdana;"&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/6185090521451311774-5462827658906855885?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/5462827658906855885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2008/01/oops-questions.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/5462827658906855885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/5462827658906855885'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2008/01/oops-questions.html' title='oops questions'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-1065955162998466982</id><published>2008-01-04T02:15:00.001-08:00</published><updated>2012-01-20T06:00:59.584-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>Interview Questions c#</title><content type='html'>&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;b style=""&gt;&lt;span style="font-size: 16pt; font-family: Verdana;"&gt;Interview Questions&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;b style=""&gt;&lt;span style="font-size: 16pt; font-family: Verdana;"&gt;C#&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;b style=""&gt;&lt;span style="font-size: 16pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;ol start="1" type="1"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s the implicit name of the parameter that gets passed into      the class’ set method?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt; Value,      and its datatype depends on whatever variable we’re changing. &lt;a name="more55"&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;How do you inherit from a class in C#? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Place a colon and then the name of the base      class. Notice that it’s double colon in C++. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Does C# support multiple inheritance? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;No, use interfaces instead. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;When you inherit a protected class-level variable, who is it      available to? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Classes in the      same namespace. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Are private class-level variables inherited? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Yes, but they are not accessible, so looking      at it you can honestly say that they are not inherited. But they are. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Describe the accessibility modifier protected internal. &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;It’s available to derived classes and classes      within the same Assembly (and naturally from the base class it’s declared      in). &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;C# provides a default constructor for me. I write a constructor      that takes a string as a parameter, but want to keep the no parameter one.      How many constructors should I write? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Two. Once you write at least one constructor, C# cancels the      freebie constructor, and now you have to write one yourself, even if      there’s no implementation in it. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s the top .NET class that everything is derived from? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;System.Object. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;How’s method overriding different from overloading? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;When overriding, you change the method      behavior for a derived class. Overloading simply involves having a method      with the same name within the class. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What does the keyword virtual mean in the method definition? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;The method can be over-ridden. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Can you declare the override method static while the original      method is non-static? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;No, you      can’t, the signature of the virtual method must remain the same, only the      keyword virtual is changed to keyword override. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Can you override private virtual methods? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;No, moreover, you cannot access private      methods in inherited classes, have to be protected in the base class to      allow any sort of access. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Can you prevent your class from being inherited and becoming a      base class for some other classes?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt; Yes, that’s what keyword sealed in the class definition is for.      The developer trying to derive from your class will get a message: cannot      inherit from Sealed class WhateverBaseClassName. It’s the same concept as      final class in Java. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Can you allow class to be inherited, but prevent the method from      being over-ridden? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Yes, just      leave the class public and make the method sealed. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s an abstract class? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;A class that cannot be instantiated. A concept in C++ known as      pure virtual method. A class that must be inherited and have the methods      over-ridden. Essentially, it’s a blueprint for a class without any      implementation. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;When do you absolutely have to declare a class as abstract (as      opposed to free-willed educated choice or decision based on UML diagram)? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;When at least one of the methods in the class      is abstract. When the class itself is inherited from an abstract class,      but not all base abstract methods have been over-ridden. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s an interface class? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;It’s an abstract class with public abstract methods all of which      must be implemented in the inherited classes. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Why can’t you specify the accessibility modifier for methods      inside the interface? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;They      all must be public. Therefore, to prevent you from getting the false      impression that you have any freedom of choice, you are not allowed to      specify any accessibility, it’s public by default. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Can you inherit multiple interfaces? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Yes, why not. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;And if they have conflicting method names? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;It’s up to you to implement the method inside      your own class, so implementation is left entirely up to you. This might      cause a problem on a higher-level scale if similarly named methods from      different interfaces expect different data, but as far as compiler cares      you’re okay. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s the difference between an interface and abstract class? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;In the interface all methods must be abstract;      in the abstract class some methods can be concrete. In the interface no      accessibility modifiers are allowed, which is ok in abstract classes. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;How can you overload a method? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Different parameter data types, different number of parameters,      different order of parameters. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;If a base class has a bunch of overloaded constructors, and an      inherited class has another bunch of overloaded constructors, can you      enforce a call from an inherited constructor to an arbitrary base      constructor? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Yes, just place      a colon, and then keyword base (parameter list to invoke the appropriate      constructor) in the overloaded constructor definition inside the inherited      class. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s the difference between System.String and      System.StringBuilder classes? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;System.String      is immutable; System.StringBuilder was designed with the purpose of having      a mutable string where a variety of operations can be performed. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s the advantage of using System.Text.StringBuilder over      System.String? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;StringBuilder      is more efficient in the cases, where a lot of manipulation is done to the      text. Strings are immutable, so each time it’s being operated on, a new      instance is created. &lt;a name="more57"&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Can you store multiple data types in System.Array? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;No. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s the difference between the System.Array.CopyTo() and      System.Array.Clone()? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;The      first one performs a deep copy of the array, the second one is shallow. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;How can you sort the elements of the array in descending order? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;By calling Sort() and then Reverse() methods. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s the .NET datatype that allows the retrieval of data by a      unique key? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;HashTable. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s class SortedList underneath? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;A sorted HashTable. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Will &lt;i&gt;finally&lt;/i&gt; block get executed if the exception had not      occurred? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Yes. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s the C# equivalent of C++ catch (…), which was a catch-all      statement for any possible exception? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;A catch block that catches the exception of type      System.Exception. You can also omit the parameter data type in this case      and just write catch {}. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Can multiple catch blocks be executed? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;No, once the proper catch code fires off, the      control is transferred to the finally block (if there are any), and then      whatever follows the finally block. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Why is it a bad idea to throw your own exceptions? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Well, if at that point you know that an error      has occurred, then why not write the proper code to handle that error      instead of passing a new Exception object to the catch block? Throwing      your own exceptions signifies some design flaws in the project. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s a delegate? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;A      delegate object encapsulates a reference to a method. In C++ they were      referred to as function pointers. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s a multicast delegate? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;It’s a delegate that points to and eventually fires off several      methods. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;How’s the DLL Hell problem solved in .NET? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Assembly versioning allows the application to      specify not only the library it needs to run (which was available under      Win32), but also the version of the assembly. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What are the ways to deploy an assembly? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;An MSI installer, a CAB archive, and XCOPY      command. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s a satellite assembly? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;When you write a multilingual or multi-cultural application in      .NET, and want to distribute the core application separately from the      localized modules, the localized assemblies that modify the core      application are called satellite assemblies. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What namespaces are necessary to create a localized application? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;System.Globalization, System.Resources. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s the difference between // comments, /* */ comments and ///      comments? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Single-line,      multi-line and XML documentation comments. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;How do you generate documentation from the C# file commented      properly with a command-line compiler? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Compile it with a /doc switch. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s the difference between &lt;c&gt; and &lt;code&gt; XML      documentation tag? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Single      line code example and multiple-line code example. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Is XML case-sensitive? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Yes,      so &lt;student&gt; and &lt;student&gt; are different elements. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What debugging tools come with the .NET SDK? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;CorDBG – command-line debugger, and DbgCLR –      graphic debugger. Visual Studio .NET uses the DbgCLR. To use CorDbg, you      must compile the original C# file using the /debug switch. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What does the This window show in the debugger? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;It points to the object that’s pointed to by      this reference. Object’s instance data is shown. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What does assert() do? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;In      debug compilation, assert takes in a Boolean condition as a parameter, and      shows the error dialog if the condition is false. The program proceeds      without any interruption if the condition is true. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s the difference between the Debug class and Trace class?      Documentation looks the same. &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Use      Debug class for debug builds, use Trace class for both debug and release      builds. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Why are there five tracing levels in      System.Diagnostics.TraceSwitcher? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;The tracing dumps can be quite verbose and for some applications      that are constantly running you run the risk of overloading the machine      and the hard drive there. Five levels range from None to Verbose, allowing      to fine-tune the tracing activities. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Where is the output of TextWriterTraceListener redirected? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;To the Console or a text file depending on the      parameter passed to the constructor. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;How do you debug an ASP.NET Web application? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Attach the aspnet_wp.exe process to the DbgClr      debugger. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What are three test cases you should go through in unit testing? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Positive test cases (correct data, correct      output), negative test cases (broken or missing data, proper handling),      exception test cases (exceptions are thrown and caught properly). &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Can you change the value of a variable while debugging a C#      application? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Yes, if you are      debugging via Visual Studio.NET, just go to Immediate window. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Explain the three services model (three-tier application). &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Presentation (UI), business (logic and      underlying code) and data (from storage or other sources). &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What are advantages and disadvantages of Microsoft-provided data      provider classes in ADO.NET? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;SQLServer.NET      data provider is high-speed and robust, but requires SQL Server license      purchased from Microsoft. OLE-DB.NET is universal for accessing other      sources, like Oracle, DB2, Microsoft Access and Informix, but it’s a .NET      layer on top of OLE layer, so not the fastest thing in the world. ODBC.NET      is a deprecated layer provided for backward compatibility to ODBC engines.      &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s the role of the DataReader class in ADO.NET connections? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;It returns a read-only dataset from the data      source when the command is executed. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What is the wildcard character in SQL? Let’s say you want to      query database with LIKE for all employees whose name starts with &lt;st1:state st="on"&gt;&lt;st1:place st="on"&gt;La.&lt;/st1:place&gt;&lt;/st1:State&gt; &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;The wildcard character is %, the proper query      with LIKE would involve ‘La%’. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Explain ACID rule of thumb for transactions. &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Transaction must be Atomic (it is one unit of      work and does not dependent on previous and following transactions),      Consistent (data is either committed or roll back, no “in-between” case      where something has been updated and something hasn’t), Isolated (no      transaction sees the intermediate results of the current transaction),      Durable (the values persist if the data had been committed even if the      system crashes right after). &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What connections does Microsoft SQL Server support? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Windows Authentication (via Active Directory)      and SQL Server authentication (via Microsoft SQL Server username and      passwords). &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Which one is trusted and which one is untrusted? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Windows Authentication is trusted because the      username and password are checked with the Active Directory, the SQL      Server authentication is untrusted, since SQL Server is the only verifier      participating in the transaction. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;Why would you use untrusted verificaion? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Web Services might use it, as well as      non-Windows applications. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What does the parameter Initial Catalog define inside Connection      String? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;The database name to      connect to. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What’s the data provider name to connect to Access database? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Microsoft.Access. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What does Dispose method do with the connection object? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Deletes it from the memory. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b&gt;&lt;span style="font-family: Verdana;"&gt;What is a pre-requisite for connection pooling? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Verdana;"&gt;Multiple processes must agree that they will      share the same connection, where every parameter is the same, including      the security settings. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family: Verdana;"&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/6185090521451311774-1065955162998466982?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/1065955162998466982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2008/01/interview-questions-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/1065955162998466982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/1065955162998466982'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2008/01/interview-questions-c.html' title='Interview Questions c#'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6185090521451311774.post-4628499684567105750</id><published>2008-01-04T02:13:00.000-08:00</published><updated>2012-01-20T05:59:38.105-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>Interview Questions asp.net</title><content type='html'>&lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;b style=""&gt;&lt;span style=";font-family:Verdana;font-size:16;"  &gt;Interview Questions
ASP.NET&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;b style=""&gt;&lt;span style=";font-family:Verdana;font-size:16;"  &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: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;1.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span style="font-family:Verdana;"&gt;Describe the role of &lt;i&gt;inetinfo.exe, aspnet_isapi.dll &lt;/i&gt;and&lt;i&gt;aspnet_wp.exe&lt;/i&gt; in the page loading process&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;. inetinfo.exe is theMicrosoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .aspx extension),the ISAPI filter aspnet_isapi.dll takes care of it by passing the request tothe actual worker process aspnet_wp.exe. &lt;a name="more50"&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;2.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span style="font-family:Verdana;"&gt;What’s the difference between Response.Write() andResponse.Output.Write()?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt; The latter one allows you to write formattedoutput. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;3.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span style="font-family:Verdana;"&gt;What methods are fired during the page load?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt; Init() - when the pageis instantiated, Load() - when the page is loaded into server memory,PreRender() - the brief moment before the page is displayed to the user asHTML, Unload() - when page finishes loading. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;4.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span style="font-family:Verdana;"&gt;Where does the Web page belong in the .NET Framework class hierarchy?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;System.Web.UI.Page &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;5.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span style="font-family:Verdana;"&gt;Where do you store the information about the user’s locale?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt; System.Web.UI.Page.Culture &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;6.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span style="font-family:Verdana;"&gt;What’s the difference between Codebehind="MyCode.aspx.cs" andSrc="MyCode.aspx.cs"?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt; CodeBehind is relevant to Visual Studio.NET only. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;7.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span style="font-family:Verdana;"&gt;What’s a bubbled event?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt; When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;8.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span style="font-family:Verdana;"&gt;Suppose you want a certain ASP.NET function executed on MouseOver overa certain button. Where do you add an event handler?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt; It’s the Attributesproperty, the Add function inside that property. So &lt;/span&gt;&lt;span style="font-family:Verdana;"&gt;btnSubmit.Attributes.Add("onMouseOver","someClientCode();")&lt;/span&gt;&lt;span style="font-family:Verdana;"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;9.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span style="font-family:Verdana;"&gt;What data type does the RangeValidator control support?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt; Integer,String and Date.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;10.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;Explain the differences between Server-side and Client-side code?&lt;a name="more5"&gt;&lt;/a&gt; &lt;span style=""&gt; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;Server-side code runs on the server. Client-side code runs in the clients’ browser.&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;11.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;What type of code (server or client) is found in a Code-Behind class? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;Server-side code.&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;12.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;Should validation (did the user enter a real date) occur server-side or client-side? Why? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;Client-side. This reduces an additional request to the server to validate the users input.&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;13.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;What does the "EnableViewState" property do? Why would I want it on or off? &lt;span style=""&gt; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;It enables the viewstate on the page. It allows the page to save the users input on a form.&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;14.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;Server.Transfer is used to post a form to another page. Response.Redirect is used to redirect the user to another page or site.&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;15.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;Can you explain the difference between an ADO.NET Dataset and an &lt;st1:city st="on"&gt;&lt;st1:place st="on"&gt;ADO&lt;/st1:place&gt;&lt;/st1:city&gt; Recordset? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=";font-family:Symbol;font-size:10;"  &gt;&lt;span style=""&gt;·&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=";font-family:Verdana;font-size:10;"  &gt;A DataSet can represent an entire relational database in memory, complete with tables, relations, and views. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=";font-family:Symbol;font-size:10;"  &gt;&lt;span style=""&gt;·&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=";font-family:Verdana;font-size:10;"  &gt;A DataSet is designed to work without any continuing connection to the original data source. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=";font-family:Symbol;font-size:10;"  &gt;&lt;span style=""&gt;·&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=";font-family:Verdana;font-size:10;"  &gt;Data in a DataSet is bulk-loaded, rather than being loaded on demand. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=";font-family:Symbol;font-size:10;"  &gt;&lt;span style=""&gt;·&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=";font-family:Verdana;font-size:10;"  &gt;There's no concept of cursor types in a DataSet. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=";font-family:Symbol;font-size:10;"  &gt;&lt;span style=""&gt;·&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=";font-family:Verdana;font-size:10;"  &gt;DataSets have no current record pointer You can use For Each loops to move through the data. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=";font-family:Symbol;font-size:10;"  &gt;&lt;span style=""&gt;·&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=";font-family:Verdana;font-size:10;"  &gt;You can store many edits in a DataSet, and write them to the original data source in a single operation. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1.25in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=";font-family:Symbol;font-size:10;"  &gt;&lt;span style=""&gt;·&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=";font-family:Verdana;font-size:10;"  &gt;Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;16.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines? &lt;span style=""&gt; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;This is where you can set the specific variables for the Application and Session objects.&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;17.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;If I’m developing an application that must accommodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;Maintain the login state security through a database.&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;18.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;Can you explain what inheritance is and an example of when you might use it? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;When you want to inherit (use the functionality of) another class. Base Class Employee. A Manager class could be derived from the Employee base class.&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;19.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;Whats an assembly? &lt;span style=""&gt; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;Assemblies are the building blocks of the .NET framework. &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconassembliesoverview.asp"&gt;Overview of assemblies from MSDN&lt;/a&gt;&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;20.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;Describe the difference between inline and code behind. &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;Inline code written along side the html in a page. Code-behind is code written in a separate file and referenced by the .aspx page.&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;21.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;Explain what a diffgram is, and a good use for one? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML. For reading database data to an XML file to be sent to a Web Service.&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;22.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;Whats MSIL, and why should my developers need an appreciation of it if at all? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL.&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;23.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;Which method do you invoke on the DataAdapter control to load your generated dataset with data? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;The .Fill() method&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;24.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;Can you edit data in the Repeater control? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt; &lt;/span&gt;No, it just reads the information from its data source&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;25.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;Which template must you provide, in order to display data in a Repeater control? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;ItemTemplate&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;26.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;How can you provide an alternating color scheme in a Repeater control? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;Use the AlternatingItemTemplate&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;27.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;You must set the DataSource property and call the DataBind method.&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;28.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;What base class do all Web Forms inherit from? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt; &lt;/span&gt;The Page class.&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;29.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;Name two properties common in every validation control? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;ControlToValidate property and Text property.&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;30.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;What tags do you need to add within the asp:datagrid tags to bind columns manually? &lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:Verdana;font-size:10;color:black;"   &gt;Set AutoGenerateColumns Property to false on the datagrid tag&lt;/span&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&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: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;31.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;What tag do you use to add a hyperlink column to the DataGrid? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;&lt;asp:hyperlinkcolumn&gt;&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/asp:hyperlinkcolumn&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;32.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;What is the transport protocol you use to call a Web service?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt; SOAP is the preferred protocol.&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;33.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;True or False: A Web service can only be written in .NET?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt; False&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;34.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;What does WSDL stand for? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;(Web Services Description Language)&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;35.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;Where on the Internet would you look for Web services? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;(&lt;a href="http://www.uddi.org/"&gt;http://www.uddi.org&lt;/a&gt;)&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;36.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt; DataTextField property&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;37.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;Which control would you use if you needed to make sure the values in two different controls matched? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt; &lt;/span&gt;CompareValidator Control&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" style="margin-left: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;38.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;True or False: To test a Web service you must create a windows application or Web application to consume this service? &lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:Verdana;font-size:10;color:black;"   &gt;False, the webservice comes with a test page and it provides HTTP-GET method to test.&lt;/span&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&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: 45pt; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt;39.&lt;span style=";font-family:&amp;quot;;font-size:7;"  &gt;                &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;span style="font-family:Verdana;"&gt;How many classes can a single .NET DLL contain? &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style=""&gt; &lt;/span&gt;It can contain many classes.&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" style=""&gt;&lt;span style="font-family:Verdana;"&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/6185090521451311774-4628499684567105750?l=www.milindmahajan.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.milindmahajan.com/feeds/4628499684567105750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.milindmahajan.com/2008/01/interview-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/4628499684567105750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6185090521451311774/posts/default/4628499684567105750'/><link rel='alternate' type='text/html' href='http://www.milindmahajan.com/2008/01/interview-questions.html' title='Interview Questions asp.net'/><author><name>Milind Mahajan</name><uri>http://www.blogger.com/profile/06622994845216661017</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_IzExBLonS2E/Sm7lrn7VJDI/AAAAAAAAA7Q/vaHJ67fPhB4/S220/DSC00695_thum.jpg'/></author><thr:total>0</thr:total></entry></feed>
