<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7836685776546151247</id><updated>2024-10-31T23:48:32.121-07:00</updated><category term="Visual Studio Tips and Tricks"/><category term="ASP.Net"/><category term="ASP.Net Interview Questions"/><category term="Visual Studio"/><category term="Validators in ASP.Net"/><category term="Visual Studio 2010"/><category term="ASP.Net Forums"/><category term="ASP.Net MVC"/><category term="CodeProject"/><category term=".Net. ASP.Net"/><category term="Achievement"/><category term="C# Interview Questions"/><category term="CSharpCorner"/><category term="IIS"/><category term="IIS Tips and Tricks"/><category term=".Net"/><category term="ASP.Net Server Controls"/><category term="Gridview"/><category term="OOPS interview Questions"/><category term="VB.Net"/><category term="Validators"/><category term="ASP.NET Books"/><category term="ASP.Net with Javascript"/><category term="Blogging"/><category term="CodeSnippets"/><category term="Create Virtual Directory"/><category term="SMS Gateways"/><category term="Team Foundation Server 2012"/><category term="Webpage"/><category term=".Net Framework Components"/><category term="Access ASP.Net Server Control in Client Side"/><category term="Awards&amp;Honors"/><category term="Blog Status"/><category term="Break Point Not Hit"/><category term="ByRef"/><category term="C#"/><category term="CRUD"/><category term="Check/Uncheck Check boxes in Gridview"/><category term="Client ID in ASP.Net"/><category term="Client Validation"/><category term="Compare Validator"/><category term="Connection String"/><category term="Custom Controls"/><category term="Custom Validator"/><category term="Design Pattern"/><category term="Dot Net Obfuscator"/><category term="Dropdown Control in Asp.Net"/><category term="Dynamic web"/><category term="Enable Adsense"/><category term="Enable IIS"/><category term="Format Number into 2 digits Using Javascript"/><category term="General"/><category term="Gridview Sample"/><category term="IE Developer Toolbar"/><category term="Important .Net Books"/><category term="Install IIS"/><category term="JQuery"/><category term="JQuery Tips"/><category term="Listbox"/><category term="MSCaptcha"/><category term="MVC"/><category term="MVP"/><category term="Model View Controller"/><category term="Nothing keyword in vb.net"/><category term="Open Live Editor"/><category term="Range Validator"/><category term="Razor"/><category term="Regular Expression Validator"/><category term="Server Controls"/><category term="Server Validation"/><category term="Shared Variable"/><category term="Simple ASP.Net Application"/><category term="Static Variable"/><category term="TempData and ASP.Net MVC"/><category term="Text to PDF"/><category term="VB.Net Tips and Tricks"/><category term="Validation Summary Control"/><category term="WCF"/><category term="Web Development"/><category term="WebResource.axd"/><category term="WebServer"/><category term="iTextSharp"/><category term="javascript"/><title type='text'>ASPDotNetChamp.Com</title><subtitle type='html'>Daily learning of an ASP.Net Developer</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>114</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-444899203300285266</id><published>2018-06-11T13:44:00.001-07:00</published><updated>2018-06-11T13:44:12.521-07:00</updated><title type='text'>HTML Attributes :  readonly VS disabled</title><content type='html'>&lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Recently, i have encountered a problem, that is i need to “disable” some text boxes after it pre filled it’s data from server. As a normal developer i decided to use the “disabled” property of the text box like below:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;lt;input&amp;#160; type=&amp;quot;text&amp;quot; id=&amp;quot;txtName&amp;quot; disabled /&amp;gt;   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;It works for me. Good! But my requirement expects some more functionalities. That is, whenever the value prefilled in the above text box, after the user clicks the “submit” button which inturn validate the value in client side and fire up the validation messages. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Here is what i stumbled! The problem arised! The “disable” property won’t allow you to edit. It will completely lock the control from edit. After that i come to know about the alternate property called “readonly”, which acts nearly like “disable” property, but one small exception you can fire the client side validations without any problem. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;lt;input&amp;#160; type=&amp;quot;text&amp;quot; id=&amp;quot;txtName&amp;quot; readonly /&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So my learning here is, if you want to lock the control entirely you can go with “disabled” property. If you want to just lock the control and wants to enable the validations means you can go with “readonly”! The above points are opt only for “text boxes” alone!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Below list provides a detailed difference between these 2 properties:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign=&quot;top&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; disabled&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/td&gt;        &lt;td valign=&quot;top&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; readonly&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot;&gt;values not passed while submitting the form &lt;/td&gt;        &lt;td valign=&quot;top&quot;&gt;values will be passed while submit the form&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot;&gt;tabbing navigation not possible&lt;/td&gt;        &lt;td valign=&quot;top&quot;&gt;allow tabbing navigation.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot;&gt;Unable to get focus.&lt;/td&gt;        &lt;td valign=&quot;top&quot;&gt;Will get focus&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot;&gt;Max. HTML controls support “disabled” property like &amp;lt;select&amp;gt;, &amp;lt;option&amp;gt;&amp;#160; and &amp;lt;button&amp;gt;.&lt;/td&gt;        &lt;td valign=&quot;top&quot;&gt;Not all form elements have readonly attribute suppor. &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Hope this helps!&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/444899203300285266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2018/06/html-attributes-readonly-vs-disabled.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/444899203300285266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/444899203300285266'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2018/06/html-attributes-readonly-vs-disabled.html' title='HTML Attributes :  readonly VS disabled'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-793391330258903150</id><published>2017-07-09T11:47:00.000-07:00</published><updated>2017-07-09T12:27:36.842-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET Books"/><title type='text'>How to Start My Final Year Project in .Net?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBKviwQ09zzklLwX3jsVUWXn3Mz9VjCMAf3Czm53ZQUAN6F19hVd1bJDMBu1ukCH-Fo7AR-qkLqMaoopFcYjyhEdpibPPKQ222Yj1FvDya70owLeSMif_hbKwGPhcRMEE_jCEqrPaNCGUb/s1600/GetReadyWithDotNet.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;347&quot; data-original-width=&quot;624&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBKviwQ09zzklLwX3jsVUWXn3Mz9VjCMAf3Czm53ZQUAN6F19hVd1bJDMBu1ukCH-Fo7AR-qkLqMaoopFcYjyhEdpibPPKQ222Yj1FvDya70owLeSMif_hbKwGPhcRMEE_jCEqrPaNCGUb/s1600/GetReadyWithDotNet.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;
Most of the college students who are doing their final year projects (especially computer science students) and beginners are asked about the below questions:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;How to start an ASP.Net Projects?&lt;/li&gt;
&lt;li&gt;What are the basic Software I need to code .Net?&lt;/li&gt;
&lt;li&gt;What are the books I referred to become better programmer?&lt;/li&gt;
&lt;/ul&gt;
In this post I just want to guide those people by providing some basic tips. &lt;i&gt;&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;Prerequisite – Skills:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
The below are the must have skill sets that are required for every beginner in ASP.Net.&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;i&gt;.Net Architecture (CLR and BaseClass Library)&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;C# or VB.Net Language&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;ASP.Net (Web Form, Worker Process, AppDomain, Session, Cache, Authentication etc)&lt;/i&gt;&lt;/li&gt;
&lt;/ol&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; It is better how the .Net frameworks works which helps to the developer to grasp the rest of the things easily. If you want to go with ASP.Net you should learn any one of the .Net compatible language such that C# or VB.Net. ADO.Net always deals with Database related objects like Datasets, Datatables etc. In beginner level choosing Web Form will give an easy to move, way in ASP.Net. The above lists are specific to .Net.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;Prerequisite – Software&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
Before start your project you need the below softwares:&lt;br /&gt;
&lt;i&gt;1. &lt;/i&gt;&lt;i&gt;Visual Studio&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;2. &lt;/i&gt;&lt;i&gt;.Net Framework&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;3. &lt;/i&gt;&lt;i&gt;SQL Server&lt;/i&gt;&lt;br /&gt;
For students and beginners express version of visual studio is enough. While this writing Microsoft released Visual Studio 2013. You can download the Visual Studio 2013 express for web development &lt;a href=&quot;http://www.microsoft.com/en-in/download/details.aspx?id=40747&quot;&gt;here&lt;/a&gt;. With that installation, .Net framework 4.5 also installed. So there is no separate download is not necessary.&lt;br /&gt;
In the meantime, Microsoft also introduced Visual Studio Community Edition, which is a complete set of IDE. So instead of going with Express Edition, you can try it. You can start download it from here.&lt;br /&gt;
Each and every website that are developed are data centric or data driven. That are data are stored and retrieved from a database like SQL Server. So you must need that one also. For SQL Server also Microsoft provide express version. You can get it SQL Server 2008 Express with SP2 &lt;a href=&quot;http://www.microsoft.com/en-in/download/details.aspx?id=29062&quot;&gt;&lt;i&gt;here&lt;/i&gt;&lt;/a&gt; and SQL Server 2012 &lt;a href=&quot;http://www.microsoft.com/en-in/download/details.aspx?id=29062&quot;&gt;&lt;i&gt;here&lt;/i&gt;&lt;/a&gt;&lt;i&gt;.&lt;/i&gt;&lt;br /&gt;
For the above software installation you must need Windows 7 with SP1 or Windows 8.&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;Some Good Books for ASP.Net:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
Below are my personal suggestion to sharpen your skills in ASP.Net as well as .Net Languages such as C# and VB.Net in some extend. &lt;br /&gt;
&lt;br /&gt;
1. &lt;i&gt;Programming ASP.Net By Dino Espotio (From Microsoft Press)&lt;/i&gt;&lt;br /&gt;
2. &lt;i&gt;Professional ASP.Net 2.0/3.5/4.5 (from wrox publications)&lt;/i&gt;&lt;br /&gt;
3. &lt;i&gt;C# 4.0 – The Complete Reference By Herbert Schildt&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;Online Tutorials &amp;amp; Trainings for ASP.Net:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;For ASP.Net technology, there are so many good online tutorial sites available. Some of them for your reference:    &lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;i&gt;&lt;a href=&quot;http://www.asp.net/getstarted&quot;&gt;www.asp.net/getstarted&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.c-sharpcorner.com/1/224/Asp-Net-programming.aspx&quot;&gt;http://www.c-sharpcorner.com/1/224/Asp-Net-programming.aspx&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.codeproject.com/KB/aspnet/&quot;&gt;&lt;i&gt;http://www.codeproject.com/KB/aspnet/&lt;/i&gt;&lt;/a&gt;    &lt;br /&gt;
&lt;a href=&quot;http://channel9.msdn.com/Tags/asp.net&quot;&gt;&lt;i&gt;http://channel9.msdn.com/Tags/asp.net&lt;/i&gt;&lt;/a&gt;    &lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;What do you think?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;    &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The above are my personal experience. Did i miss anything or do you want to say something, please let me know you thoughts as comments.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/793391330258903150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2017/07/how-to-start-my-final-year-project.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/793391330258903150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/793391330258903150'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2017/07/how-to-start-my-final-year-project.html' title='How to Start My Final Year Project in .Net?'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBKviwQ09zzklLwX3jsVUWXn3Mz9VjCMAf3Czm53ZQUAN6F19hVd1bJDMBu1ukCH-Fo7AR-qkLqMaoopFcYjyhEdpibPPKQ222Yj1FvDya70owLeSMif_hbKwGPhcRMEE_jCEqrPaNCGUb/s72-c/GetReadyWithDotNet.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-2469676039439292090</id><published>2016-10-12T13:43:00.001-07:00</published><updated>2016-10-12T14:18:25.123-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="TempData and ASP.Net MVC"/><title type='text'>ASP.Net MVC : TempData - A Closer Look</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwAXO89c_sx-B9imX0DSnzuQjf8z9h9GSjEq5X83CH2u9ovX1u3lQt-YiqNe4E3AsxXal2PRPK4GyX1NRom-xA7hM8rRRxGrwymontW734MW_5rmERhUdBwXh4X4Ngtwd9X9VJ_iQLfo5R/s1600/TempData.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwAXO89c_sx-B9imX0DSnzuQjf8z9h9GSjEq5X83CH2u9ovX1u3lQt-YiqNe4E3AsxXal2PRPK4GyX1NRom-xA7hM8rRRxGrwymontW734MW_5rmERhUdBwXh4X4Ngtwd9X9VJ_iQLfo5R/s1600/TempData.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; As an ASP.Net MVC developer, you may frequently 
involved with these terms like Tempdata, viewdata and viewbag. In this post, I’m 
going to take a close look&amp;nbsp;about TempData&amp;nbsp;and how it works.&lt;br /&gt;
&lt;br /&gt;
Read:&amp;nbsp;&lt;a href=&quot;http://www.aspdotnetchamp.com/2016/08/aspnet-mvc-viewbag-viewdata-and-tempdata.html&quot; target=&quot;_blank&quot;&gt;ViewBag, ViewData and TempData&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
For explanation purpose, I’m going to create a small MVC project with 3 views 
and a controller.&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Index.cshtml – This is the default view, which is loaded by the default 
action method. 
&lt;/li&gt;
&lt;li&gt;Page1.cshtml 
&lt;/li&gt;
&lt;li&gt;Page2.cshtml &lt;/li&gt;
&lt;/ol&gt;
And the controller named as:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;DefaultController.cs&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;strong&gt;&lt;u&gt;TempData:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
We will start with TempData. I will set the value of TempData in the Action 
method “Index”, like below:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;using System.Web.Mvc;
namespace SessionHandlingInMVC.Controllers 
{ 
&amp;nbsp;&amp;nbsp;&amp;nbsp; public class 
DefaultController : Controller 
&amp;nbsp;&amp;nbsp;&amp;nbsp; { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // GET: Default &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
public ActionResult Index() 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
          TempData[&quot;MyTempDataValue&quot;] = &quot;Value initialized in Index Action Method&quot;; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return View(); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
public ActionResult Page1() 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return View(&quot;Page1&quot;); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
public ActionResult Page2() 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return View(&quot;Page2&quot;); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
}&lt;/pre&gt;
&lt;br /&gt;
In the “Index” view, we can get the value of the initialized “Tempdata” value as 
below:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;&amp;lt;h2&amp;gt;Index Page&amp;lt;/h2&amp;gt;
&amp;lt;p&amp;gt; 
&amp;nbsp;&amp;nbsp; @{ 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string strTempDataValue = 
(string)TempData[&quot;MyTempDataValue&quot;]; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&amp;nbsp;&amp;nbsp;&amp;nbsp; @strTempDataValue 
&amp;lt;/p&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
Please take a close look how the value is retrieved from the “TempData”.You 
can’t directly assigned to it the specific type.&amp;nbsp; &lt;strong&gt;A typecasting is 
needed, when you retrieved the value from Tempdata&lt;/strong&gt;. The above snippet 
just get the value from TempData dictionary and print it on.&lt;br /&gt;
&lt;br /&gt;
In the next snippet, I’m going to change the above snippet a little bit like 
below:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;&amp;lt;h2&amp;gt;Index Page&amp;lt;/h2&amp;gt; 
&amp;lt;p&amp;gt; 
&amp;nbsp;&amp;nbsp; @{ 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string 
strTempDataValue = (string)TempData[&quot;MyTempDataValue&quot;]; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
@strTempDataValue
&amp;nbsp;&amp;nbsp;&amp;nbsp; @{ 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string strAnotherRead = 
(string)TempData[&quot;MyTempDataValue&quot;]; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&amp;nbsp;&amp;nbsp;&amp;nbsp; @strAnotherRead 
&amp;lt;/p&amp;gt;



&lt;/pre&gt;
In the above snippet, we have read the TempData value as twice. As a result 
the value also printed twice in the view.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqZRaCv78tuP-8Et5ajaG4tq7fBjByp8PMaD1x2anJbMRdYUgp7PSaMSTkLv7R2yRRyMm6z1joV5RZw76pTx9DtF0Qp1jH0cHhTSjtxNLuMEdSoJoLl6-7ozXDmWZ8mug0_HEIKAqOOMqQ/s1600/TempData-ReadValues.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;162&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqZRaCv78tuP-8Et5ajaG4tq7fBjByp8PMaD1x2anJbMRdYUgp7PSaMSTkLv7R2yRRyMm6z1joV5RZw76pTx9DtF0Qp1jH0cHhTSjtxNLuMEdSoJoLl6-7ozXDmWZ8mug0_HEIKAqOOMqQ/s320/TempData-ReadValues.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
The above result confirm that, &lt;strong&gt;you can read the TempData value inside 
the current request as much time as possible&lt;/strong&gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
In the following snippet, I’m going to read the value of the TempData in the 
next view, which is rendered by the action method “Page1”.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;&amp;lt;h2&amp;gt;Page1&amp;lt;/h2&amp;gt; 
&amp;lt;p&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; @{ 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string 
strTempDataValueInPage1 = (string)TempData[&quot;MyTempDataValue&quot;]; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
@strTempDataValueInPage1 
&amp;lt;/p&amp;gt;
 

&lt;/pre&gt;
In order to test the above scenario, first you must render the view “Index” 
(since in that action method alone the tempdata value is initialized) and then 
you call the “Page1” view. As you can see that, TempData value is not available in the next request.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-7rVG2GjnKY6C8E6w1_XysOBEbpj2pyB4t3kxZ4FsrMV9g7iay2KRRoLx8lRMw-83rVGGh8KFfelKN6eN_yG5ENTUSzgtDenEiGya5a2iHOUXChAmBPc8P3D1ATpmKto0tWY8hfZ_I4fe/s1600/TempData-AfterRefresh.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;189&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-7rVG2GjnKY6C8E6w1_XysOBEbpj2pyB4t3kxZ4FsrMV9g7iay2KRRoLx8lRMw-83rVGGh8KFfelKN6eN_yG5ENTUSzgtDenEiGya5a2iHOUXChAmBPc8P3D1ATpmKto0tWY8hfZ_I4fe/s320/TempData-AfterRefresh.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Wait! The conclusion is not yet over. I want to try some thing more. That is, 
as per the above codes:&lt;br /&gt;
&lt;br /&gt;
1. First I render the “Index” page, where the Tempdata value is read and 
print it.&lt;br /&gt;
2. After I call the action method “Page1”.&lt;br /&gt;
&lt;br /&gt;
What will happens if I didn’t read the value of Tempdata in “Index.cshtml” 
view and try to read the “Page1.cshtml” view. In order to test, I made the below 
changes in Index view.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Index.cshtml:&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;&amp;lt;h2&amp;gt;Index Page&amp;lt;/h2&amp;gt; 
&amp;lt;p&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; No Temp Data read here 
in Index.cshtml 
&amp;lt;/p&amp;gt;


&lt;/pre&gt;
&lt;b&gt;Page1.cshtml:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;&amp;lt;h2&amp;gt;Page1&amp;lt;/h2&amp;gt; 
&amp;lt;p&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; @{ 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string 
strTempDataValueInPage1 = (string)TempData[&quot;MyTempDataValue&quot;]; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
@strTempDataValueInPage1 
&amp;lt;/p&amp;gt;


&lt;/pre&gt;
Now, you got the value in the value of Tempdata in the next request. That means, 
your first request render the “Index” page, and the next request render the 
“Page1”.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqm4vE730XIWxNJ2780KvapARHZC7UvH9dm2_Hs3ukLIIvCFS1XH4B1haDsMUdcS2TRejtGzsnXkkf07i3PQrQ7w2w2ptcwru56y2Iy0dP6p2y2pVuvq5D7k6C-iJ3A8jsL96-hkmc5KuC/s1600/TempData-NoRead.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;176&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqm4vE730XIWxNJ2780KvapARHZC7UvH9dm2_Hs3ukLIIvCFS1XH4B1haDsMUdcS2TRejtGzsnXkkf07i3PQrQ7w2w2ptcwru56y2Iy0dP6p2y2pVuvq5D7k6C-iJ3A8jsL96-hkmc5KuC/s320/TempData-NoRead.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaCJ28ZSeFd3FlAhRVvenLgVyCwEHrOod6tfGCSfY3Dgoj0uyquCcMNpRWG2v-6l2SU6R5napRKJ5nq1HJ1qGvCMW_zMud3pFXZI28ippmZyPP75hSraudY178fu6JnUifQgIHEgqLdmW1/s1600/TempData-ReadValueInNextView.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;204&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaCJ28ZSeFd3FlAhRVvenLgVyCwEHrOod6tfGCSfY3Dgoj0uyquCcMNpRWG2v-6l2SU6R5napRKJ5nq1HJ1qGvCMW_zMud3pFXZI28ippmZyPP75hSraudY178fu6JnUifQgIHEgqLdmW1/s320/TempData-ReadValueInNextView.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
If you refresh the above page, you will get the result as below: that is, the 
Tempdata is unavailable once it read. So you get the Tempdata value as empty.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEhbVwj5SAz3fSHLT4hWxnOKEgO1mXewIsZFkrRdOU5P2EoX7RxDQ14zL1GFTMpxJTFR2ZA7rNcJZmcN-Dt2kNFh8c3-YY4z5MHAM8vwgAVd_MpTi8P3_7iq8eUQkJ4aQ-4E7POKoLA-Zm/s1600/TempData-ReadValuesInAnotherView.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;173&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEhbVwj5SAz3fSHLT4hWxnOKEgO1mXewIsZFkrRdOU5P2EoX7RxDQ14zL1GFTMpxJTFR2ZA7rNcJZmcN-Dt2kNFh8c3-YY4z5MHAM8vwgAVd_MpTi8P3_7iq8eUQkJ4aQ-4E7POKoLA-Zm/s320/TempData-ReadValuesInAnotherView.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
So the conclusion is : &lt;strong&gt;After Tempdata value is initialized and it’s 
not yet read in the current request, then it will be available in the next 
request. Once it is read, it will not available. &lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Few words about Keep() and Peek() method:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
After you read the tempdata, if you call the keep method, it will marks the 
all tempdata keys or specific key for retention. &lt;br /&gt;
&lt;br /&gt;
If you want to fetch the key and mark the key for retention (keep the key for 
the next request) then you can go with Peek method.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Connection between Session and Tempdata:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Yes, Tempdata uses “Session” object in the backend. That is, whenever you use 
a tempdata it will handled by session. But the main difference is, the Tempdata 
will be removed (by default) after the first read. &lt;br /&gt;
&lt;br /&gt;
At the same time, you may have the doubt, that either tempdata is specific to 
the user as like as “Session”? The answer is Yes. Since the Tempdata, is backed 
up with Session, Tempdata is also specific to user, like Session object.&lt;br /&gt;
&lt;br /&gt;
Also, the another question is, since the Tempdata backed up with Session, 
what will happened if we go with same key for session and Tempdata as like 
below:&lt;br /&gt;
&lt;br /&gt;
The answer is it won’t colloid. It will considered as a different one and it 
will serve its own purpose as per the convention. &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;In summary:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;TempData store the value using key. 
&lt;/li&gt;
&lt;li&gt;TempData backed up with Session.
&lt;/li&gt;
&lt;li&gt;Need type casting when the stored value retrieved. 
&lt;/li&gt;
&lt;li&gt;The life time of tempdata is little bit tricky. It will be available till 
you read it first time. After you read it, it will be marked for deletion. So in 
the next request, it won’t available.&amp;nbsp; However, you can extend it’s life time by 
using keep and peek method.&lt;/li&gt;
&lt;/ol&gt;
Readers, did i missed anything? Share your feedback as comments.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/2469676039439292090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/10/aspnet-mvc-tempdata-closer-look.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/2469676039439292090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/2469676039439292090'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/10/aspnet-mvc-tempdata-closer-look.html' title='ASP.Net MVC : TempData - A Closer Look'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwAXO89c_sx-B9imX0DSnzuQjf8z9h9GSjEq5X83CH2u9ovX1u3lQt-YiqNe4E3AsxXal2PRPK4GyX1NRom-xA7hM8rRRxGrwymontW734MW_5rmERhUdBwXh4X4Ngtwd9X9VJ_iQLfo5R/s72-c/TempData.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-2436935280940656331</id><published>2016-10-10T19:55:00.000-07:00</published><updated>2016-10-10T19:55:23.042-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CodeSnippets"/><category scheme="http://www.blogger.com/atom/ns#" term="Dropdown Control in Asp.Net"/><title type='text'>ASP.Net : Binding Dropdown in ASP.Net</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Binding dropdown is a common need in ASP.Net. The below code snippet is used to bind the datatable values to the dropdown list.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Markup:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;
&amp;lt;head runat=&quot;server&quot;&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:DropDownList runat=&quot;server&quot; ID=&quot;ddlCity&quot;&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/asp:DropDownList&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

&lt;/pre&gt;
&lt;b&gt;&lt;u&gt;Code behind:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; protected void Page_Load(object sender, EventArgs e)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!IsPostBack)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Substitute your DB and Server name below
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string conString = @&quot;Data Source=Your_DBServer_Name;Initial Catalog=Your_DB_Name;Integrated Security=True&quot;;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataTable dtCity = new DataTable(&quot;City&quot;);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Create Connection and get the DB values
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using (SqlConnection connection= new SqlConnection(conString))
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SqlCommand command = new SqlCommand(conString,connection);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; command.CommandText = &quot;Select city_code,city_description from tblCity&quot;;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SqlDataAdapter adapter = new SqlDataAdapter(command);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; adapter.Fill(dtCity);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Set the Datasource
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ddlCity.DataSource = dtCity;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ddlCity.DataValueField = &quot;city_code&quot;;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ddlCity.DataTextField = &quot;city_description&quot;;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Finally Bind it
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ddlCity.DataBind();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;pre&gt;&lt;b&gt;&lt;u&gt;
&lt;/u&gt;&lt;/b&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/2436935280940656331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/10/aspnet-binding-dropdown-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/2436935280940656331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/2436935280940656331'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/10/aspnet-binding-dropdown-in-aspnet.html' title='ASP.Net : Binding Dropdown in ASP.Net'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-632819708410278877</id><published>2016-08-02T21:08:00.001-07:00</published><updated>2016-08-02T21:08:40.768-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net MVC"/><title type='text'>ASP.Net MVC - ViewBag, ViewData and Tempdata</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4XFtPhp7mWJ1Qc6JkHEYJKBrW3TtQYY1jL83feGkTIzv1Ujv8joWjYb5cSlpmrZiIZvcw4A6qi_2sBhKxJ0tI9HUplPv43ZdTEwqqz6UPN_2q-rP4jqfIjI-7QzgzbAgskr5SOj5WW24R/s1600/ViewData-ViewBag-Tempdata-in-ASP.NetMVC.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;204&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4XFtPhp7mWJ1Qc6JkHEYJKBrW3TtQYY1jL83feGkTIzv1Ujv8joWjYb5cSlpmrZiIZvcw4A6qi_2sBhKxJ0tI9HUplPv43ZdTEwqqz6UPN_2q-rP4jqfIjI-7QzgzbAgskr5SOj5WW24R/s640/ViewData-ViewBag-Tempdata-in-ASP.NetMVC.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; As an ASP.Net MVC developer, you may frequently involved with these terms 
like Tempdata, viewdata and viewbag. In this post, I’m going to discuss about 
what are they and what are the main difference between them.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;ViewBag:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;ViewBag is dynamic in nature. 
&lt;/li&gt;
&lt;li&gt;There is no type casting needed. 
&lt;/li&gt;
&lt;li&gt;Life time lasts only for the current request. &lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;View Data:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;ViewData is stored as a dictionary. You can store a value using a key. 
&lt;/li&gt;
&lt;li&gt;Type casting is needed, when you retrieve. 
&lt;/li&gt;
&lt;li&gt;Life time lasts only for the current request. &lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Tempdata:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;It’s also store the value using key. 
&lt;/li&gt;
&lt;li&gt;Need type casting when the stored value retrieved. 
&lt;/li&gt;
&lt;li&gt;The life time of tempdata is little bit tricky. It will be available till 
you read it first time. After you read it, it will be marked for deletion. So in 
the next request, it won’t available.&amp;nbsp; However, you can extend it’s life time by 
using keep and peek method. &lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
Hope this helps!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/632819708410278877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/08/aspnet-mvc-viewbag-viewdata-and-tempdata.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/632819708410278877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/632819708410278877'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/08/aspnet-mvc-viewbag-viewdata-and-tempdata.html' title='ASP.Net MVC - ViewBag, ViewData and Tempdata'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4XFtPhp7mWJ1Qc6JkHEYJKBrW3TtQYY1jL83feGkTIzv1Ujv8joWjYb5cSlpmrZiIZvcw4A6qi_2sBhKxJ0tI9HUplPv43ZdTEwqqz6UPN_2q-rP4jqfIjI-7QzgzbAgskr5SOj5WW24R/s72-c/ViewData-ViewBag-Tempdata-in-ASP.NetMVC.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-6640489586388281955</id><published>2016-07-17T01:19:00.000-07:00</published><updated>2016-07-17T13:08:33.334-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio Tips and Tricks"/><title type='text'>Visual Studio 2015 : Unable to open .CSHTML files</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho1AiCmU8Z5hjPDPbMYVLMvkBYm7D8HUxWxhPd3K-3Av-3_Ih_1Ec2s46M_GxSe5GdRRmJ76GJvEoXYUp5Zcgf2_nV-OlpERMS2tTyIo61N7r7LkhD31JJafWvjdvybhQJC_Pc4PEeJJt4/s1600/VSProblem.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Unable to open CSHTML File in VisualStudio&quot; border=&quot;0&quot; height=&quot;323&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho1AiCmU8Z5hjPDPbMYVLMvkBYm7D8HUxWxhPd3K-3Av-3_Ih_1Ec2s46M_GxSe5GdRRmJ76GJvEoXYUp5Zcgf2_nV-OlpERMS2tTyIo61N7r7LkhD31JJafWvjdvybhQJC_Pc4PEeJJt4/s640/VSProblem.jpg&quot; title=&quot;Unable to open CSHTML File in VisualStudio&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Visual studio 2015 is very cool IDE. It offers more and more benefits to increase the productivity of a developer. For my local development I’m using VS 2015 “Community” Edition. Also, I have updated with latest “Update 3” from &lt;a href=&quot;https://www.visualstudio.com/en-us/news/releasenotes/vs2015-update3-vs&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;The Problem:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; But after some days,&amp;nbsp; when i want to open a .cshtml file in my solution, VS throws some strange isssue, that is a pop up throws with the message “&quot;Operation could not be completed. Invalid Pointer.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;The Solution:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I’m not pretty much sure, this error is because of “Update 3”. But i soloved this issue by following the below steps:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Close your VS instance&lt;/li&gt;
&lt;li&gt; Open the “Run” dialog (by pressing the short cut Windows Key +R).&lt;/li&gt;
&lt;li&gt; Type “%LocalAppData%” (without quotes).&lt;/li&gt;
&lt;li&gt; It will open the path “C:\Users\&lt;strong&gt;YOURUSERNAME&lt;/strong&gt;\AppData\Local” in that navigate to “Microsoft –&amp;gt; Visual Studio –&amp;gt; 14.0 –&amp;gt;ComponentModelCache”.&lt;/li&gt;
&lt;li&gt;It contains some “cache” files, just delete them all.&lt;/li&gt;
&lt;li&gt;Now open the VS 2015 again. You can open the .cshtml files, without any problem.&lt;/li&gt;
&lt;/ol&gt;
The above trick, worked for me. This issue also discussed in &lt;a href=&quot;https://github.com/aspnet/Tooling/issues/276&quot; target=&quot;_blank&quot;&gt;this github thread&lt;/a&gt;. There are various solutions disscused over there, but i found this one is working for me, which is among one they discussed. &lt;br /&gt;
&lt;br /&gt;
If you are one of the victim, hope this post may be useful for you!&amp;nbsp; &lt;img alt=&quot;Smile&quot; class=&quot;wlEmoticon wlEmoticon-smile&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmwiHaaSOTC52aSIPoFdjpL-fdyIGzTtE3YIVkdtRQpcysYzdFxvtlrBFncY4alCBcmDWfyV-pSL-1b0DbzKEm9oEeolU3PCSNrmPcy9EM2QotMyGDDrV1aumL9WvJ5bTnW0N7NKUOU7Eu/?imgmax=800&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/6640489586388281955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/07/visual-studio-2015-unable-to-open.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/6640489586388281955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/6640489586388281955'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/07/visual-studio-2015-unable-to-open.html' title='Visual Studio 2015 : Unable to open .CSHTML files'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho1AiCmU8Z5hjPDPbMYVLMvkBYm7D8HUxWxhPd3K-3Av-3_Ih_1Ec2s46M_GxSe5GdRRmJ76GJvEoXYUp5Zcgf2_nV-OlpERMS2tTyIo61N7r7LkhD31JJafWvjdvybhQJC_Pc4PEeJJt4/s72-c/VSProblem.jpg" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-6266531427837726093</id><published>2016-07-13T15:44:00.001-07:00</published><updated>2016-07-13T21:18:54.331-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WCF"/><title type='text'>WCF : Service Configuration Editor</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcSwXTaQLWkh_MWxetO2mZ781Qq5G6O9iIbl_B82BHNadQr1fkFk7Ny7B6bf1x3_lXiJf-GXhVssj7zlclDNDOtsaUgqTzRQ9y1K7NXgW9esnkff8PNK0rKhz0IblspZMKpTtp8fDKosCF/s1600-h/WCF%252520ConfigEditor%25255B40%25255D.png&quot;&gt;&lt;img alt=&quot;WCF ConfigEditor&quot; border=&quot;0&quot; height=&quot;206&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5NDjpuMpMKyXjcS8KdnHFG2b_-yJUT0x_mCq947xG_0dWWnoaLzLm3Hj4vGEemr6-jzKve5L9SLY5I4Uo1gcEdEFfTcaao2ljZdxHySyF5aj49-ZAgPRY6zoNcnnPKGdFAHpzbgvKFP0k/?imgmax=800&quot; style=&quot;background-image: none; border: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;WCF ConfigEditor&quot; width=&quot;504&quot; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Windows Communication Foundation involves lot of configuration apart from service coding. Configuring the WCF service is a tedious process also. In order to configure the WCF Services, we need to put our hand mostly on the web.config file, where all the configuration elements resides. As a WCF service developer, I know it is little bit tedious process to configure an simple binding element in the configuration section.&lt;br /&gt;
&lt;br /&gt;
In order to simplify (as much as possible) the configuration process, Microsoft provides an utility to configure the WCF service called “WCF Service Configuration Editor”, which is available as a built –in utility with Visual Studio. &lt;br /&gt;
&lt;br /&gt;
In this particular post, i’m going to explain how to use the WCF Service Configuration editor and how to set different end points with it.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Open WCF Configuration Editor:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You can open the WCF Configuration Editor using the menu “Tools –&amp;gt; WCF Configuration Editor”. Otherwise, you can right click on the Web.config file and select “Edit WCF Configuration” on the context menu.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;strong&gt;&lt;u&gt;Create Binding:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
1. In the WCF Config Editor, select “Bindings” in the left “Configuration” tree view and click the “New Binding Configuration” link button.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi77Zp6ml7ERHW_EneeCAdUXDtDKCJt7IP4-NlIK33ZFMSu9iG2ITVHOJxupkd8xch2IDjTPfK4hCym57_VzbSeRXgHgdBsq_uVa5JQH5DphwZDgZMesyvEEH4GtyF16tRw3dvUnKHR0Xcv/s1600/ConfigureBinding1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi77Zp6ml7ERHW_EneeCAdUXDtDKCJt7IP4-NlIK33ZFMSu9iG2ITVHOJxupkd8xch2IDjTPfK4hCym57_VzbSeRXgHgdBsq_uVa5JQH5DphwZDgZMesyvEEH4GtyF16tRw3dvUnKHR0Xcv/s320/ConfigureBinding1.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;font-size: 12.8px;&quot;&gt;Add Binding Configuration&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
2. It will open the “Create a new binding” dialog. In this select the respective binding you want. For this, example i will go with “Basic Http Binding” option and then click “OK”.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZwcPlfaUx0IPV1pw1-piKlEpttXFlHtRCzyF0L9FyXbw-uj9U9P5dG0LN_cIGdR0O8oMHObAz5GreunxqiOv808N-0rluxxBF1DIj7SpWi_vS5f2pAAYCPy5cObZSh-qXPBYPVV7Z5NlA/s1600/SelectBinding.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZwcPlfaUx0IPV1pw1-piKlEpttXFlHtRCzyF0L9FyXbw-uj9U9P5dG0LN_cIGdR0O8oMHObAz5GreunxqiOv808N-0rluxxBF1DIj7SpWi_vS5f2pAAYCPy5cObZSh-qXPBYPVV7Z5NlA/s320/SelectBinding.jpg&quot; width=&quot;215&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
3. WCF Cofig Editor, will provide the all the attributes in the table format&lt;br /&gt;
under the “Binding” tab. You can configure the attribute by setting the valid values. I have set the “Name”&amp;nbsp; as “Sample Http Binding”.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoUHuVkJVuhci3_96zvCP4DPDehKrG_0gzE-Y0pNvHBXefL2IlTeshWQb9XU7TMfa_lN13wX4hq2wsahCOPq0YIy5m87lEc7NygietHG2E9yhcgfFfg2k89ymbE9VDWCIlkMs2csQlHTBs/s1600/ConfigureBinding2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoUHuVkJVuhci3_96zvCP4DPDehKrG_0gzE-Y0pNvHBXefL2IlTeshWQb9XU7TMfa_lN13wX4hq2wsahCOPq0YIy5m87lEc7NygietHG2E9yhcgfFfg2k89ymbE9VDWCIlkMs2csQlHTBs/s320/ConfigureBinding2.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;font-size: 12.8px;&quot;&gt;Configure Binding Attribute&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
4. If you select “Security” tab, security related attributes are populated as a table format,where you can set the values related to security.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsTWzxIDoPkilTR6xS5Xbu8UDgcskqIjv4WIdhip_PnVpR7Ati7C5Ne_4i0JXDuD5d4IOjM8C7ig5I74HyVHwAEgKRpS-ONk8sLjVNWWYrl06UoGf6B_V07oc2u6wATHCTmczTrH7lTfeZ/s1600/ConfigureSecurity.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsTWzxIDoPkilTR6xS5Xbu8UDgcskqIjv4WIdhip_PnVpR7Ati7C5Ne_4i0JXDuD5d4IOjM8C7ig5I74HyVHwAEgKRpS-ONk8sLjVNWWYrl06UoGf6B_V07oc2u6wATHCTmczTrH7lTfeZ/s320/ConfigureSecurity.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Security Settings&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Create End Point:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
1. Select the &quot;Endpoints” node in the “Configuration” treeview. Then click “New Client Endpoint” link button.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1xvzeIj8-9AK71JOOR7hRgQ8qFxSpDAwt96j53P_uNTqdEpIF1D3OrklSrHjuIhvJ6kYXWCckZRFq3H8Q8frG6813eafPAQyIKmEo18BbhqYU2h5sqp_ehNqHWFvtDkbeDa22c6lz0Cp5/s1600/CreateEndPoint.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1xvzeIj8-9AK71JOOR7hRgQ8qFxSpDAwt96j53P_uNTqdEpIF1D3OrklSrHjuIhvJ6kYXWCckZRFq3H8Q8frG6813eafPAQyIKmEo18BbhqYU2h5sqp_ehNqHWFvtDkbeDa22c6lz0Cp5/s320/CreateEndPoint.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
2. Previously we have created “Basic Http Binding”, So we need to select the “binding” as “Basic Http Binding”.&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;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu_FcWGtay1o-VVAnXMXEc8LynpEPR4uvY1RI-_3FEEG1t-yyPRx_3NfytbZ66zk7EAhPCj2wLNzZ1mIV3AFsh04u_d0tlkr9v-oFSwObcSyJBbjU9QsiAy34jQ54VYc8_wjVhLLepTwWn/s1600/ConfigureEndPoint.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu_FcWGtay1o-VVAnXMXEc8LynpEPR4uvY1RI-_3FEEG1t-yyPRx_3NfytbZ66zk7EAhPCj2wLNzZ1mIV3AFsh04u_d0tlkr9v-oFSwObcSyJBbjU9QsiAy34jQ54VYc8_wjVhLLepTwWn/s320/ConfigureEndPoint.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
3. For “Contract” attribute value, click the browse button and select the WCF service’s dll location. It will extract the Contract from the dll and put it there. Otherwise, you can manually set it.&lt;br /&gt;
4. Set the “Address” attribute as the web service location, that is the url, where the WCF service was hosted.&lt;br /&gt;
I have set the mandatory attribute alone in the above steps. There are lot of options will be available under the “Identity” tab. if you need any one of these you can set it.&lt;br /&gt;
&lt;br /&gt;
So we are good with our configuration, just save it using “File –&amp;gt; Save”. As a result, the “Web.config” file will be updated with the values which we have configured just now.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMCrsSkqL-HIHd3ls4bkPTN-QwE78wDa6xyZMf-kwstG9b6ETDg2svkiWgmjvGabQUpE0D_xiA8AZrbvDOi0spmcQov69pdOcQc0IlagqLGKeOpCMV5np4L3d2_vDJEDUKhruagL16bMba/s1600/UpdatedConfigFile.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;231&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMCrsSkqL-HIHd3ls4bkPTN-QwE78wDa6xyZMf-kwstG9b6ETDg2svkiWgmjvGabQUpE0D_xiA8AZrbvDOi0spmcQov69pdOcQc0IlagqLGKeOpCMV5np4L3d2_vDJEDUKhruagL16bMba/s320/UpdatedConfigFile.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Web.config with configured binding and endpoint&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
As a whole, if you are going to configure some complex binding at this time “WCF Configuration Editor” really helpful!&lt;br /&gt;
&lt;br /&gt;
Readers! I hope this article is helpful. Please let me know your thoughts as comments!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/6266531427837726093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/07/wcf-service-configuration-editor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/6266531427837726093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/6266531427837726093'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/07/wcf-service-configuration-editor.html' title='WCF : Service Configuration Editor'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5NDjpuMpMKyXjcS8KdnHFG2b_-yJUT0x_mCq947xG_0dWWnoaLzLm3Hj4vGEemr6-jzKve5L9SLY5I4Uo1gcEdEFfTcaao2ljZdxHySyF5aj49-ZAgPRY6zoNcnnPKGdFAHpzbgvKFP0k/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-5155280417975033517</id><published>2016-05-03T17:12:00.000-07:00</published><updated>2016-06-08T05:17:19.802-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net"/><title type='text'>Conventional File Uploading in ASP.Net</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This post is going to give some basic ideas about file uploading in ASP.Net. Mostly every data driven web site will provide this feature. Also, every ASP.Net developer face this kind of requirement at least once in his/her developer life. &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvtLJMC93bwr3pdO6Uu22xpZlEF7PnL7NSx0FxSEYcOMEdXU0b8oaUmQzu2_VL4tOT5j22pFzYO80ApTqS-TYdkNZ2no04AZPd8FRq6noy_IsS2_xAX_McR-QWRQcVTk2lfT2hVBVdQzV6/s1600/FileUpload.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;162&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvtLJMC93bwr3pdO6Uu22xpZlEF7PnL7NSx0FxSEYcOMEdXU0b8oaUmQzu2_VL4tOT5j22pFzYO80ApTqS-TYdkNZ2no04AZPd8FRq6noy_IsS2_xAX_McR-QWRQcVTk2lfT2hVBVdQzV6/s400/FileUpload.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Note: &lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The file upload control renders slightly/completely different from browser to browser. If you want to give a consistent UI, you can check my previous post &lt;a href=&quot;http://www.aspdotnetchamp.com/2014/04/file-upload-controlhow-to-give-same-ui.html&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
If you want to upload a file in ASP.Net, it is very simple. You need to include “File Upload” control on your form and place a command button, which triggers the upload process and save the respective file in the specified location on the server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;&amp;lt;div&amp;gt; 
           &amp;lt;asp:FileUpload runat=&quot;server&quot; ID=&quot;fileUploader&quot; AllowMultiple=&quot;false&quot; /&amp;gt; 
           &amp;lt;br /&amp;gt; 
           &amp;lt;asp:Button runat=&quot;server&quot; Text=&quot;Upload&quot; ID=&quot;btnUpload&quot; OnClick=&quot;btnUpload_Click&quot; /&amp;gt; 
&amp;lt;/div&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
On the code behind you should include the below lines:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;protected void btnUpload_Click(object sender, EventArgs e)    
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(fileUploader.HasFile)     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileUploader.SaveAs(Server.MapPath(@&quot;~\UploadedFile\&quot;)+ fileUploader.FileName);     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Note:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
In the above code snippet, when you click the button, it will save the file in a specified location on the server. As per the above code, it looks for the directory “UploadedFile” in the server. So you need to create the directory on your application, before executing the code, otherwise the application will throw an error while run.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Upload specific File Types:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
In some cases, we may want to force the user upload only the specific file types. This is an inevitable scenario for the professional programmers. In this case, we should validate the file types, if it pass then we can go with upload. Otherwise, the user will be notified by an “error” message. In order to validate, I’m going to use the built-in ASP.Net validation control.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;&amp;lt;div&amp;gt; 
            &amp;lt;asp:FileUpload runat=&quot;server&quot; ID=&quot;fileUploadExcel&quot; AllowMultiple=&quot;false&quot; /&amp;gt; 
            &amp;lt;br /&amp;gt; 
            &amp;lt;asp:Button runat=&quot;server&quot; Text=&quot;Upload&quot; ID=&quot;btnUploadExcel&quot; OnClick=&quot;btnUploadExcel_Click&quot; /&amp;gt; 
            &amp;lt;asp:RegularExpressionValidator runat=&quot;server&quot; ControlToValidate=&quot;fileUploadExcel&quot; 
                ValidationExpression=&quot;^.*\.xls[xm]?$&quot; 
                ErrorMessage=&quot;Please upload excel file only&quot;&amp;gt;&amp;lt;/asp:RegularExpressionValidator&amp;gt; 
&amp;lt;/div&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
The code behind not much changed compare to the previous one.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;protected void btnUploadExcel_Click(object sender, EventArgs e)    
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (fileUploadExcel.HasFile)     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileUploadExcel.SaveAs(Server.MapPath(@&quot;~\UploadedFile\&quot;) + fileUploadExcel.FileName);     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;/pre&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Restrict File Size:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
In some cases, we need to restrict the file size. Say for example, we may need to force the user to upload an excel file not more than 1 MB. At this case, we should validate this one from the server as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;protected void btnUploadExcel_Click(object sender, EventArgs e)    
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (fileUploadExcel.HasFile)     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int fileSize = fileUploadExcel.PostedFile.ContentLength;     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (fileSize &amp;lt;= 1048576)     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileUploadExcel.SaveAs(Server.MapPath(@&quot;~\UploadedFile\&quot;) + fileUploadExcel.FileName);     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lblError.Text = &quot;File size exceeds more than 1 MB.&quot;;     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }     
&amp;nbsp;&amp;nbsp;&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;/pre&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
&lt;b&gt;&lt;u&gt;Upload Multiple Files:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
In some cases, we may need to upload multiple files. ASP.Net gives an easy way to achieve this. The file upload server controls had a property called “AllowMultiple”, which is a boolean value (either true or false). By turn it as “true”, the file upload control control allows you to select multiple files.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;&amp;lt;div&amp;gt; 
&amp;lt;asp:FileUpload runat=&quot;server&quot; ID=&quot;fileUploadMultiple&quot; AllowMultiple=&quot;true&quot; /&amp;gt; 
&amp;lt;br /&amp;gt; 
&amp;lt;asp:Button runat=&quot;server&quot; Text=&quot;Upload&quot; ID=&quot;btnUploadMultiple&quot; OnClick=&quot;btnUploadMultiple_Click&quot; /&amp;gt; 
&amp;lt;asp:RegularExpressionValidator runat=&quot;server&quot; ControlToValidate=&quot;fileUploadMultiple&quot; 
ValidationExpression=&quot;^.*\.doc[x]?$&quot; ID=&quot;RegularExpressionValidator1&quot; 
ErrorMessage=&quot;Please upload word file only&quot;&amp;gt;&amp;lt;/asp:RegularExpressionValidator&amp;gt; 
&amp;lt;asp:Label runat=&quot;server&quot; ID=&quot;Label1&quot; Style=&quot;color: red;&quot;&amp;gt;&amp;lt;/asp:Label&amp;gt; 
&amp;lt;/div&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
In the code behind, the code like below. It get the files and loop thru the selected files and check the file size then store it in the particular path.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;protected void btnUploadMultiple_Click(object sender, EventArgs e)    
{     
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (fileUploadMultiple.HasFile)     
&amp;nbsp;&amp;nbsp;&amp;nbsp; {     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HttpFileCollection files = Request.Files;     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i=0;i &amp;lt; files.Count;i++)     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HttpPostedFile file = files[i];     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(file.ContentLength &amp;gt;0)     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileUploadMultiple.SaveAs(Server.MapPath(@&quot;~\UploadedFile\&quot;) + file.FileName);     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }     
&amp;nbsp;&amp;nbsp;&amp;nbsp; }     
}    
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
I hope this post gives an some basic understanding and standard validations during the File upload in ASP.Net. Let me know your thoughts as comments. Happy Coding! &lt;img alt=&quot;Smile&quot; class=&quot;wlEmoticon wlEmoticon-smile&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgXHte2E9HN1cyRv4E25GaBNbQpRyWAS1TKuh47eOYdjtoJfvNK7-zOCU1-GIMu9UIB1QVtLsRhZZVm4OvBFLlUzT7f6bSD56zkHexP8VMFhXg2LYKQyZR3UWQM-YwSrDM3QDWKi1-vOHG/?imgmax=800&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/5155280417975033517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/05/File-uploading-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/5155280417975033517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/5155280417975033517'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/05/File-uploading-in-aspnet.html' title='Conventional File Uploading in ASP.Net'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvtLJMC93bwr3pdO6Uu22xpZlEF7PnL7NSx0FxSEYcOMEdXU0b8oaUmQzu2_VL4tOT5j22pFzYO80ApTqS-TYdkNZ2no04AZPd8FRq6noy_IsS2_xAX_McR-QWRQcVTk2lfT2hVBVdQzV6/s72-c/FileUpload.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-4709263263774822687</id><published>2016-03-13T14:12:00.001-07:00</published><updated>2016-03-13T14:12:15.167-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Web Development"/><title type='text'>Identify the ASP.Net Version of an ASP.Net Application from Browser</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO4iFRrjp5N3WpBR-xNlNHXunAs4MaVmVKfoi_xlokxA_DdAubPEv7G90Iz4ODux_7QmUDF0DbU3SmcUCwulSpjB812h59WyfX4Soo58D8ho21dS2rm99aAmKSNbaZhcKjXdTZ2xOfloCm/s1600/Built-With-Which-Technology.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;128&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO4iFRrjp5N3WpBR-xNlNHXunAs4MaVmVKfoi_xlokxA_DdAubPEv7G90Iz4ODux_7QmUDF0DbU3SmcUCwulSpjB812h59WyfX4Soo58D8ho21dS2rm99aAmKSNbaZhcKjXdTZ2xOfloCm/s320/Built-With-Which-Technology.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; In my previous article, i explained about how to use IE Developer tool bar. As a web developer, whenever I browse a “cool” website, i always want to know about what type of technology behind this. As an ASP.Net developer, in this post, i’m going to discuss about how to identify a particular website is built with ASP.Net or Not from the popular browsers like IE, Chrome and Firefox. There are various ways exist, I’m here listed few of them.   &lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;strong&gt;Analyze the Source Code: &lt;/strong&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If a website is built with ASP.Net Webforms you can identify it by review the “markup” source code from the browser. If the website built with web form then you can find the hidden element called “viewstate” in the source code. This will hint that the page you are viewing is developed using ASP.Net Web Form.&amp;nbsp;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;This is the easiest way to find whether the website you are viewing built with ASP.Net web form or not. But this technique, will not tell the version of the ASP.Net. If you want, to know about the version information also then you need to follow any one of the below ways.&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;strong&gt;Use third party plugins:&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Yes! There are third party browser plugin also available for this purpose. You can find the one in the below url: &lt;a href=&quot;http://builtwith.com/toolbar&quot; title=&quot;http://builtwith.com/toolbar&quot;&gt;http://builtwith.com/toolbar&lt;/a&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; This plugin is available for most of the popular browsers like Firefox, Chrome and Safari except IE, when i write this post. Just include this on your browsers and you can find out the technology behind with the currently rendered on the browser.    &lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh-ky_Vu5zh8HisvISFV3Lchm5ngyhDY-7Pe6RzYWO-sS9iA2zMs7nSKq7YcBb_OgV9k2fqoRW505mfrLc5WBULAf_jd-7uqjagnDp_cT5OBaRb_m3kwQQZHwJ0r_vxrpnGjrBf2EFOZL9/s1600/Builtwith-Addon-For-Chrome.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh-ky_Vu5zh8HisvISFV3Lchm5ngyhDY-7Pe6RzYWO-sS9iA2zMs7nSKq7YcBb_OgV9k2fqoRW505mfrLc5WBULAf_jd-7uqjagnDp_cT5OBaRb_m3kwQQZHwJ0r_vxrpnGjrBf2EFOZL9/s320/Builtwith-Addon-For-Chrome.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Using Built with Addon&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;strong&gt;Using Developer Toolbar:&lt;/strong&gt;    &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IE doesn’t require any plugins or add-ons. You can find the technology behind this using the built-in tool called “IE Developer Toolbar”. This toolbar, contains a tab called “Network”. In this tab, you can find the necessary detail.&lt;/div&gt;
&lt;br /&gt;
Read : &lt;a href=&quot;http://www.aspdotnetchamp.com/2016/03/IEDeveloperToolbar.html&quot; target=&quot;_blank&quot;&gt;How to use IE Developer Toolbar&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx1Q3EfjREISP9WNtOoUJqI1HhY6efMiOtqS40z2mycv2R74F4pxlxt-RnealVc_nkkjhQ8oyXje-D8SsLo6PGrhtJBB2HaQaUe8uXWvdHcyJXnTUY26SwmKTTjLN1JtGTqsu4Y29Fsigo/s1600/IE-Developer-Toolbar-Network-Tab.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;278&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx1Q3EfjREISP9WNtOoUJqI1HhY6efMiOtqS40z2mycv2R74F4pxlxt-RnealVc_nkkjhQ8oyXje-D8SsLo6PGrhtJBB2HaQaUe8uXWvdHcyJXnTUY26SwmKTTjLN1JtGTqsu4Y29Fsigo/s320/IE-Developer-Toolbar-Network-Tab.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Using Fiddler:&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As all of us know that Fiddler is a famous Web Debugger, which is also provide the facility to analyse the response header elements as the previous one. If you don’t have Fiddler you can download it from this url:&amp;nbsp;&lt;a href=&quot;https://www.telerik.com/download/fiddler&quot; title=&quot;https://www.telerik.com/download/fiddler&quot;&gt;https://www.telerik.com/download/fiddler&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGW3d0q_uMeEvt0-k0cFjZG07zjFoDzr4pC-2EcyKGxwARJjIE7lM55iauTfKNgLMIsggzvIml5AP4eSm1HwklXWr2mGCDwQSlf2KiaWmxCjkm5rgUcXjEaADm_oaWY-j6pIkfsjr8kdsA/s1600/Fiddler-ResponseHeaders.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGW3d0q_uMeEvt0-k0cFjZG07zjFoDzr4pC-2EcyKGxwARJjIE7lM55iauTfKNgLMIsggzvIml5AP4eSm1HwklXWr2mGCDwQSlf2KiaWmxCjkm5rgUcXjEaADm_oaWY-j6pIkfsjr8kdsA/s320/Fiddler-ResponseHeaders.jpg&quot; width=&quot;278&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Readers, hope you enjoy this post. Let me know your thoughts as comments!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/4709263263774822687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/03/identify-aspnet-version-of-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/4709263263774822687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/4709263263774822687'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/03/identify-aspnet-version-of-aspnet.html' title='Identify the ASP.Net Version of an ASP.Net Application from Browser'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO4iFRrjp5N3WpBR-xNlNHXunAs4MaVmVKfoi_xlokxA_DdAubPEv7G90Iz4ODux_7QmUDF0DbU3SmcUCwulSpjB812h59WyfX4Soo58D8ho21dS2rm99aAmKSNbaZhcKjXdTZ2xOfloCm/s72-c/Built-With-Which-Technology.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-3247196507018282075</id><published>2016-03-10T20:25:00.000-08:00</published><updated>2016-03-09T16:37:36.368-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IE Developer Toolbar"/><title type='text'>F12 Developer Toolbar in IE– A Good Rescuer</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHHjisb6HL1cAMGTHafomk99eAMsxPXr_jsLZ_Pe54WwIN6FTilhyNy4BIPmchTIEDC23kVU-9MgI8otmUneYpmrWWDAJunG0OEYZkvv5jq9kWeZJWxv9Un3ExFJi8IFjVyh-bpGFLA9uI/s1600/F12DeveloperToolbar-A+GoodRescuer.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;218&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHHjisb6HL1cAMGTHafomk99eAMsxPXr_jsLZ_Pe54WwIN6FTilhyNy4BIPmchTIEDC23kVU-9MgI8otmUneYpmrWWDAJunG0OEYZkvv5jq9kWeZJWxv9Un3ExFJi8IFjVyh-bpGFLA9uI/s320/F12DeveloperToolbar-A+GoodRescuer.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;As a web developer, every one will dealt with Internet Explorer. Since our ultimate final output will be render the proper “angle brackets” in browser. In some cases, we may find difficult to debug the rendered HTML. At that time, F12 developer toolbar comes as a rescuer. In this tutorial i have used Internet Explorer Version 10. If you are using the next versions of IE, the look and feel of the toolbar vary slightly, but there is no functional changes that are discussed here. :)&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;So what is F12 Developer Toolbar:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;F12 Developer Toolbar is a built-in add-on with Internet Explorer. It will popup from IE when you press F12 Key on your keyboard. Alternatively you can get it by clicking “Tools –&amp;gt; F12 developer tools”. By default, it will be stick with the bottom of IE. In the following section I have mentioned the the uses of F12 Developer toolbar.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmoBsxtsw3K_W4g7fefINwzBvURoVvT0-Ms1_L5kYHLbLO8JLPwNCXvX_hTpKDgRtiI6Fab2gjlH0xQMNvv8as7mSq3VNSGKTSytlmoO2Cmh56i4nAGJHquGkTCsCiL530H1KKb6UGvOAI/s1600/F12DeveloperToolbar.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;224&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmoBsxtsw3K_W4g7fefINwzBvURoVvT0-Ms1_L5kYHLbLO8JLPwNCXvX_hTpKDgRtiI6Fab2gjlH0xQMNvv8as7mSq3VNSGKTSytlmoO2Cmh56i4nAGJHquGkTCsCiL530H1KKb6UGvOAI/s320/F12DeveloperToolbar.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;F12 Developer Toolbar&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;strong&gt;&lt;u&gt;Using F12 Developer Toolbar:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
There are lot of uses of F12 Developer Toolbar. In this article I am going to highlight few of them. With F12 Toolbar you can:&lt;br /&gt;
1) Select DOM Elements&lt;br /&gt;
2) Debug Javascript&lt;br /&gt;
3) Identify the Javascript errors or missing HTML tag errors on your files.&lt;br /&gt;
4) Trace the applied CSS classes.&lt;br /&gt;
5) Analyze the Network Timing&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Set up the code:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
In order to explain the above functionalities I have used the below HTML markup. It’s a simple ASPX file with a textbox and a button. The text box accepts an integer value and validate it and show the alert box accordingly.&lt;br /&gt;
&lt;pre class=&quot;brush:html&quot; style=&quot;text-align: left;&quot;&gt;&amp;lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeBehind=&quot;Home.aspx.cs&quot; Inherits=&quot;SessionDemo.Home&quot; %&amp;gt;
&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;
&amp;lt;head runat=&quot;server&quot;&amp;gt;
    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
    &amp;lt;link href=&quot;Home.css&quot; rel=&quot;stylesheet&quot; /&amp;gt;
    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
        function validateAge()
        {
            var age = document.getElementById(&quot;txtAge&quot;).value;
            if(isNaN(age))
            {
                alert(&quot;You have entered valid age&quot;);
            }
            else {
                alert(&quot;You have entered invalid age&quot;);
            }
        }
    &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;
        &amp;lt;div&amp;gt;
            Enter Age: 
            &amp;lt;input type=&quot;text&quot; id=&quot;txtAge&quot; /&amp;gt;
            &amp;lt;input type=&quot;button&quot; id=&quot;btnValidate&quot; value=&quot;Validate Age&quot; onclick=&quot;validateAge();&quot; class=&quot;btn&quot;/&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Select DOM Elements:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
This is an important feature of Developer Toolbar. You can easily navigate the particular DOM elements by clicking on it on the IE. So that you can easily spot the respective &quot;piece of markup&quot; for that element in the whole page. This facilitate to easily fix the issues related to design.In order to select the DOM element, you need to do the following:&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Select the Arrow mark icon (Select Element by click) on the top left in Developer toolbar.&lt;/li&gt;
&lt;li&gt;Now you can select any element in the page(Elements are highlighted with the rectangle boxes).&lt;/li&gt;
&lt;li&gt;When you select the element, soon the IE Developer toolbar will highlight the particular markup. Refer the below screen shot.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZcangQfkjNOIwNXeS1qpruzWsUncmTrmCj1haE2CXxzJZXlnrg_pfCEA-o6IYv7LpIn8Pjave2LFBVOT4IMX3y881-aH09y1_nO20fPnzKf-TcO5Yncsf4V4Pn0hZT_uxWoVfFzKzA3_L/s1600/F12DeveloperToolbar-Select-DOM-Element.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZcangQfkjNOIwNXeS1qpruzWsUncmTrmCj1haE2CXxzJZXlnrg_pfCEA-o6IYv7LpIn8Pjave2LFBVOT4IMX3y881-aH09y1_nO20fPnzKf-TcO5Yncsf4V4Pn0hZT_uxWoVfFzKzA3_L/s320/F12DeveloperToolbar-Select-DOM-Element.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Select DOM Element&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;strong&gt;&lt;u&gt;Debug JS using F12 Toolbar:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
In order to debug the JS, just run the above HTML page in IE and follow the steps:&lt;br /&gt;
1) Open F12 Toolbar&lt;br /&gt;
2) Go to “Script” tab, where the entire markup listed.&lt;br /&gt;
3) Place the breakpoint on the javascript. (Please refer the below screen how to set the breakpoint)&lt;br /&gt;
4) Click on the “Start debugging” button.&lt;br /&gt;
5) Since the Js function is triggered when you click the button. Just click the button to start the debugging.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0bwWVmphmK1_gdAQVQgJqYJ4_fBKjXs4QZ8Oh1c13HEdSfGUpI9ffV-k_6m8f3vnyA7RWEnBzV5NGK4gH-95S_dVF4LsXb0nG0kNblsIs6S2SUPAIKWyccclCh1_DpwDvzahCF6K2tpz6/s1600/F12DeveloperToolbar-Javascript-SetBreakpoint.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0bwWVmphmK1_gdAQVQgJqYJ4_fBKjXs4QZ8Oh1c13HEdSfGUpI9ffV-k_6m8f3vnyA7RWEnBzV5NGK4gH-95S_dVF4LsXb0nG0kNblsIs6S2SUPAIKWyccclCh1_DpwDvzahCF6K2tpz6/s320/F12DeveloperToolbar-Javascript-SetBreakpoint.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Setup the Breakpoint&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjakSZsN0uALEpj22EmvmdAp7fPncnASHey1jaGRMMfOLZsHAOE0x878Mxl8XcPoe82yxwv13Zn1R_O6LeCvfzUluAeVUYmbbMXwM5Z2fv_Ojjn_GLzWj6_WrF8PT1d59FSTRWcmpcg0aiq/s1600/F12DeveloperToolbar-Javascript-Debugging.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjakSZsN0uALEpj22EmvmdAp7fPncnASHey1jaGRMMfOLZsHAOE0x878Mxl8XcPoe82yxwv13Zn1R_O6LeCvfzUluAeVUYmbbMXwM5Z2fv_Ojjn_GLzWj6_WrF8PT1d59FSTRWcmpcg0aiq/s320/F12DeveloperToolbar-Javascript-Debugging.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Debug JS in IE Developer Toolbar&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;u&gt;&lt;strong&gt;Identify the Javascript errors:&lt;/strong&gt;&lt;/u&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In some case as a developer we may do some mistakes typo error. As an example, refer the below code at line no 10, wrongly typed as value() instead of value (which is get the text box value). There is no such method is available in JS. It will be easily identified by IE developer toolbar. The point here is, these type of Javascript related issues easily identified by IE Developer tool bar.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:html&quot; style=&quot;text-align: left;&quot;&gt;&amp;lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeBehind=&quot;Home.aspx.cs&quot; Inherits=&quot;SessionDemo.Home&quot; %&amp;gt;
&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;
&amp;lt;head runat=&quot;server&quot;&amp;gt;
    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
    &amp;lt;link href=&quot;Home.css&quot; rel=&quot;stylesheet&quot; /&amp;gt;
    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
        function validateAge()
        {
            var age = document.getElementById(&quot;txtAge&quot;).value();
            if(isNaN(age))
            {
                alert(&quot;You have entered valid age&quot;);
            }
            else {
                alert(&quot;You have entered invalid age&quot;);
            }
        }
    &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;
        &amp;lt;div&amp;gt;
            Enter Age: 
            &amp;lt;input type=&quot;text&quot; id=&quot;txtAge&quot; /&amp;gt;
            &amp;lt;input type=&quot;button&quot; id=&quot;btnValidate&quot; value=&quot;Validate Age&quot; onclick=&quot;validateAge();&quot; class=&quot;btn&quot;/&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
In order to identify these kind of issues, you should follow the below steps:&lt;br /&gt;
1) Render you page in IE.&lt;br /&gt;
2) Open F12 toolbar.&lt;br /&gt;
3) Select the “Console” tab.&lt;br /&gt;
4) Since this JS function is called when you hit the button “Validate Age”. So just click on it.&lt;br /&gt;
5) You can see the error messge and when you click on the hyper link detail it will point out the repective line that causes the error.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmQXD6GQaFsZeYhNkSJQDz36bMNaT24R13bKA9Sy3wzqUAyGp-bPNaxscg3O9oJbdRQnI8hCPEIAlB6ZqG1dF8a8Ai_sUTeeBkFt-lfP3Zr3jlDatwdEJTyjD7byVBt0YbvdZKO5RERtCB/s1600/Javascript-Error.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;193&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmQXD6GQaFsZeYhNkSJQDz36bMNaT24R13bKA9Sy3wzqUAyGp-bPNaxscg3O9oJbdRQnI8hCPEIAlB6ZqG1dF8a8Ai_sUTeeBkFt-lfP3Zr3jlDatwdEJTyjD7byVBt0YbvdZKO5RERtCB/s320/Javascript-Error.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Identify Javascript Error&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;u&gt;&lt;strong&gt;Identify missing HTML tag errors:&lt;/strong&gt;&lt;/u&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Most of the time we may not closed the end tag of the HTML element. Most of the time it will not cause any issues luckily. In some worst cases, it will collapse all the design of your page. IE Developer tool bar is very much helpful in this case also. It will throw a warning message in the “Console” if your markup missed out anything like missing closing tag.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:html&quot; style=&quot;text-align: left;&quot;&gt;&amp;lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeBehind=&quot;Home.aspx.cs&quot; Inherits=&quot;SessionDemo.Home&quot; %&amp;gt;
&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;
&amp;lt;head runat=&quot;server&quot;&amp;gt;
    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
    &amp;lt;link href=&quot;Home.css&quot; rel=&quot;stylesheet&quot; /&amp;gt;
    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
        function validateAge()
        {
            var age = document.getElementById(&quot;txtAge&quot;).value();
            if(isNaN(age))
            {
                alert(&quot;You have entered valid age&quot;);
            }
            else {
                alert(&quot;You have entered invalid age&quot;);
            }
        }
    &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;
        &amp;lt;div&amp;gt;
            Enter Age: 
            &amp;lt;input type=&quot;text&quot; id=&quot;txtAge&quot; /&amp;gt;
            &amp;lt;span&amp;gt;&amp;lt;span&amp;gt;
            &amp;lt;input type=&quot;button&quot; id=&quot;btnValidate&quot; value=&quot;Validate Age&quot; onclick=&quot;validateAge();&quot; class=&quot;btn&quot;/&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
As you see the above code missing a closing tag in the “span” element at the line no 26. When you run the page you can see the warning message in the console like below:&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEn7LcckTZu-cwrOD2kQUwo7JaYxgViGU__6uvCZfS2pcRJAIGHP39N-Yy3Ug237eO6PnM_6ZhBIKz1qL47yoV4-bwekOEvPoJ4tG5XA1_nykoTrkfmXPQ1DUtYkbW9wXHwu8XSk-EGuCL/s1600/F12DeveloperToolbar-Identify-MissingTags.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEn7LcckTZu-cwrOD2kQUwo7JaYxgViGU__6uvCZfS2pcRJAIGHP39N-Yy3Ug237eO6PnM_6ZhBIKz1qL47yoV4-bwekOEvPoJ4tG5XA1_nykoTrkfmXPQ1DUtYkbW9wXHwu8XSk-EGuCL/s320/F12DeveloperToolbar-Identify-MissingTags.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Identify Missing HTML Tags using Developer Toolbar&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;strong&gt;Trace CSS:&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; In some cases, we may require the to change the applied css, in the page to achieve the exact design as per requirement we have. Normally, as a developer we render the page in browser and comes to the source code and adjust the CSS classes then again go to and run the page in browser to check the changes.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;In these kind of scenario, F12 developer tool bar plays a vital role to save developer’s time. With the help of F12 developer tool bar, you can edit your applied CSS classes and see the result immeditately in the browser.This feature always helps a lot in terms of saves our time.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;For demo purpose, i have used a simple CSS file and included in the ASPX file.In order to edit/trace the applied CSS classes, you need to follow the below steps:&lt;br /&gt;
1) Render you page in IE.&lt;br /&gt;
2) Open F12 toolbar. (by press F12 toolbar)&lt;br /&gt;
3) Select the “CSS” tab, it will list all the CSS elements used in the page. &lt;br /&gt;
4) You can remove the applied style by uncheck the check box. Also, you can create your own rule and apply and view it the browser itself. &lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqhHMekZ1fdhryqISzWTcHa2EiQ8jgNsEDuZOe7RF9QmBDYskKwQN_F6IjP_RRm_dS7LW1Pni9FUkYl7x3LrDpJ0CXMUGi-ZgIUwtBcYhZnyefqQQfn9FxCSBnxlrTXv5yMImwZcETHEvk/s1600/F12DeveloperToolbar-AddCSSRule.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;216&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqhHMekZ1fdhryqISzWTcHa2EiQ8jgNsEDuZOe7RF9QmBDYskKwQN_F6IjP_RRm_dS7LW1Pni9FUkYl7x3LrDpJ0CXMUGi-ZgIUwtBcYhZnyefqQQfn9FxCSBnxlrTXv5yMImwZcETHEvk/s320/F12DeveloperToolbar-AddCSSRule.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Trace CSS using IE Developer Toolbar&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;strong&gt;Analyze Network Timings:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
In some scenario, you may need to want to know about the network timings that took for each requests. These kind of analysis are helpful to do performance related improvements on the browser end. In such case, the &quot;Network&quot; tab in the IE Developer toolbar plays a vital role. You need to follow the below steps to work with network tab:&lt;br /&gt;
1) Render you page in IE.&lt;br /&gt;
2) Open F12 toolbar. (by press F12 toolbar)&lt;br /&gt;
3) Select the “Network” tab.&lt;br /&gt;
4) Click “Start debugging” (When you click, the button text will be modified as “Stop debugging”).&lt;br /&gt;
5) Then you need reload the page (by pressing F5). This is because whenever the page loads at that time only the files are downloaded from the server. &lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTrUV6KXXKV1z22LAc1RWD2WRIZtvvFz8Wpe45L8f41vqfP7ZIjq0A3RpC74ZEH52Xe97OgP8OOSu3NyS6UvhfJUibxjzzhEJoZmTJmQxldyXxGO8L5TKBnmJVEwEJBtGiN_pPdrJzvYIN/s1600/F12DeveloperToolbar-NetworkTab.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTrUV6KXXKV1z22LAc1RWD2WRIZtvvFz8Wpe45L8f41vqfP7ZIjq0A3RpC74ZEH52Xe97OgP8OOSu3NyS6UvhfJUibxjzzhEJoZmTJmQxldyXxGO8L5TKBnmJVEwEJBtGiN_pPdrJzvYIN/s320/F12DeveloperToolbar-NetworkTab.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 12.8px;&quot;&gt;Network Tab in IE Developer Toolbar&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;b&gt;About Other Browsers:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Other popular browsers also provide these kind 
utilities. Chrome offers in the name of &quot;Developer Tools&quot; and Firefox 
provide as &quot;Inspect Element&quot;. These tools also provide the same kind of 
facilities like IE Developer Toolbar.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&lt;/div&gt;
I hope you enjoyed this tutorial. For beginners it will give some good idea about the IE Developer toolbar. &amp;nbsp;Let me know your thoughts as comments. :)&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/3247196507018282075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/03/IEDeveloperToolbar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/3247196507018282075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/3247196507018282075'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/03/IEDeveloperToolbar.html' title='F12 Developer Toolbar in IE– A Good Rescuer'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHHjisb6HL1cAMGTHafomk99eAMsxPXr_jsLZ_Pe54WwIN6FTilhyNy4BIPmchTIEDC23kVU-9MgI8otmUneYpmrWWDAJunG0OEYZkvv5jq9kWeZJWxv9Un3ExFJi8IFjVyh-bpGFLA9uI/s72-c/F12DeveloperToolbar-A+GoodRescuer.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-6710338043844634935</id><published>2016-02-07T15:15:00.000-08:00</published><updated>2016-02-07T15:39:52.117-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CodeProject"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio Tips and Tricks"/><title type='text'>Visual Studio Tips and Tricks -13 : Debugging with Visual Studio</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Visual Studio is a great IDE for developing all type of Microsoft desktop/web stack applications. There is no doubt on that!. One of the main feature provided in Visual Studio is it’s capability provide more options to debugging the applications. In this post I explained some basic concepts about debugging in Visual Studio.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdTGLDQ4TCbw20aqCtkKZPhmFp0AhvkRfc-E6po89EAtc04mu-u9T_n3j2dbpZPT1B3zmEd2WwTW-cLx_cPbavg6gK31m4wQ9i2J_nnQfBhXuT9eyPjaspSUlvzepmbFHm9B_FvuadwjoG/s1600/keep-calm-and-debug-on-3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdTGLDQ4TCbw20aqCtkKZPhmFp0AhvkRfc-E6po89EAtc04mu-u9T_n3j2dbpZPT1B3zmEd2WwTW-cLx_cPbavg6gK31m4wQ9i2J_nnQfBhXuT9eyPjaspSUlvzepmbFHm9B_FvuadwjoG/s320/keep-calm-and-debug-on-3.png&quot; width=&quot;273&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
You can also check my other Visual Studio Tips &lt;a href=&quot;http://www.aspdotnetchamp.com/search/label/Visual%20Studio%20Tips%20and%20Tricks&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Setup the environment:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
In this post I’m using Visual Studio 2015 Community edition. Based on your version of Visual studio some options may differ. For simple and neat explanation, here I’m going to use a simple for loop C# code snippet.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;So What is breakpoint?&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
When you run the program in Visual Studio IDE, if you want to check the execution of a particular routine or function at that time you can set the breakpoint. Probably, it set before to run the application. So when the program executes, the breakpoint hits and the program waits there. So that you can step into the program and take a deep look into the code and check the values there itself. This is the main advantage of breakpoints.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Set normal Breakpoint:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
Set the breakpoint in an application is very simple. You can hit the F9 key or you can click on the left most border in Visual Studio. It will keep the break point on the particular line.&lt;br /&gt;
After setting the break point, Visual Studio indicate the particular line with the Red color and preceded with a dot like below.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdR-IBUAcEq7khlpCRldlfVwE2WurylsM0xuQAWyHYeku43P1dMsj3bq7fPDWR6w0uOrx6FLHha5wzpxIybzuLv-iyF7noaV-8VcJpAmLi1rSiAF_0XcV6tltJrI_-_fLmUN90Bb5FdCXu/s1600/Breakpoint-in-VisualStudio.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Breakpoint-in-VisualStudio&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdR-IBUAcEq7khlpCRldlfVwE2WurylsM0xuQAWyHYeku43P1dMsj3bq7fPDWR6w0uOrx6FLHha5wzpxIybzuLv-iyF7noaV-8VcJpAmLi1rSiAF_0XcV6tltJrI_-_fLmUN90Bb5FdCXu/s1600/Breakpoint-in-VisualStudio.JPG&quot; title=&quot;Breakpoint-in-VisualStudio&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Breakpoint-in-VisualStudio&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
In these kind of break points, it will hit without any conditions. So whenever, the execution cross the line it will simply hit there.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Set Conditional Breakpoint:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
So as we discussed in the previous section,say for example, if we set the break point with in a loop it will hit the break point without any condition. So the break point is hit often. Instead of this, we may want to set some conditions. Let’s see how we can do it.&lt;br /&gt;
&lt;br /&gt;
1. Right click on the break point and select “Conditions…” in the context menu.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEpWjgWSkJqmgU07LkKrOaOAn-fU9AaSN1jboI2oKifj3b6tVOy97VZI0EknBn15fVzpWplKKKtFmJ4c8h4ZgGEVH8qSA0SUC4zYM0U6KjgvpJMfc0cYgCJ_8hblo_DES0kKNUccKsQ9AS/s1600/Conditional-Breakpoint-Menu.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Conditional-Breakpoint-Menu&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEpWjgWSkJqmgU07LkKrOaOAn-fU9AaSN1jboI2oKifj3b6tVOy97VZI0EknBn15fVzpWplKKKtFmJ4c8h4ZgGEVH8qSA0SUC4zYM0U6KjgvpJMfc0cYgCJ_8hblo_DES0kKNUccKsQ9AS/s1600/Conditional-Breakpoint-Menu.JPG&quot; title=&quot;Conditional-Breakpoint-Menu&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Conditional-Breakpoint-Menu&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
2. Visual Studio 2015 offers the below “Breakpoint Settings” window to set up the condition.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoiB03Cfn02R0_O3JyXkNGr0HMWnKqggAOtbmc-R6NTDMYssZ0Q12FI_-QE_frE4-PwyhGTD1yw8ulBYuIY9IQgpVHo77u6cEKArhH_W6wfr0C8maYI6t1Dd9KwE8YD1T8geNjNqzE9e1z/s1600/Conditional-Breakpoint-Window.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Conditional-Breakpoint-Window&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoiB03Cfn02R0_O3JyXkNGr0HMWnKqggAOtbmc-R6NTDMYssZ0Q12FI_-QE_frE4-PwyhGTD1yw8ulBYuIY9IQgpVHo77u6cEKArhH_W6wfr0C8maYI6t1Dd9KwE8YD1T8geNjNqzE9e1z/s1600/Conditional-Breakpoint-Window.JPG&quot; title=&quot;Conditional-Breakpoint-Window&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;em style=&quot;font-size: medium; text-align: left;&quot;&gt;Conditional-Breakpoint-Window&lt;/em&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
3. Here I’m going to set the “Conditions” as : When the counter value(i) is greater than 5 at that time it will hit the break point. That means, till the value of the counter value is 5, it will not hit. After that it will hit.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikDhw3xkNa5j-7FREdCxOP8L5PQFTfpxjPNtap7jEvdPQebhF2An0-NoNUkvJYBtgVT9oicUpw4PYSrtUnE0O0Q289CL4V59Gf0an9hrO46B8nzx2l0MgKsfmNBO46UKcICfI16newSSqB/s1600/Setting-Conditions.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Setting-Conditions&quot; border=&quot;0&quot; height=&quot;220&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikDhw3xkNa5j-7FREdCxOP8L5PQFTfpxjPNtap7jEvdPQebhF2An0-NoNUkvJYBtgVT9oicUpw4PYSrtUnE0O0Q289CL4V59Gf0an9hrO46B8nzx2l0MgKsfmNBO46UKcICfI16newSSqB/s640/Setting-Conditions.JPG&quot; title=&quot;Setting-Conditions&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;em style=&quot;font-size: medium; text-align: left;&quot;&gt;Set-Conditions&lt;/em&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
In some cases you may want to track based on some process id or thread id etc. Visual studio also give options for this.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6gzJ1xISOaNxD7XdF0a2vdpCYA4griuDfhgl0fpBnGWWpODNUFbyC61iCVNsKtBLnPwq3W1PDHupyZBazx2z0TOVk0WGD9JsBUJleOCaBI1MYEEKjAYWhPKyscsx08jxXw-WlBM2dBKPp/s1600/Breakpoint-Window-Filter.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Breakpoint-Window-Filter&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6gzJ1xISOaNxD7XdF0a2vdpCYA4griuDfhgl0fpBnGWWpODNUFbyC61iCVNsKtBLnPwq3W1PDHupyZBazx2z0TOVk0WGD9JsBUJleOCaBI1MYEEKjAYWhPKyscsx08jxXw-WlBM2dBKPp/s1600/Breakpoint-Window-Filter.JPG&quot; title=&quot;Breakpoint-Window-Filter&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
In some cases, we want to count the “Hit count”,meant whenever the break point hits it will consider as a hitcount. You can specify it by selecting “Hit Count” list item as below:&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTfUkEkFpNUIY12XRfLQireVe7mjJMnRnywNE91Mt0TcByzJiGjQ5lzaI3M5-G6UJ2SxgMfqCMJ7yt6eFbQbPzmjtTBIS5S0MWiuzEHd2et0eZ_Zc_cSDe5ITUkKgYhhK-SgCMIhUOoNQs/s1600/Breakpoint-Window-HitCount.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Breakpoint-Window-HitCount&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTfUkEkFpNUIY12XRfLQireVe7mjJMnRnywNE91Mt0TcByzJiGjQ5lzaI3M5-G6UJ2SxgMfqCMJ7yt6eFbQbPzmjtTBIS5S0MWiuzEHd2et0eZ_Zc_cSDe5ITUkKgYhhK-SgCMIhUOoNQs/s1600/Breakpoint-Window-HitCount.JPG&quot; title=&quot;Breakpoint-Window-HitCount&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Breakpoint-Window-HitCount&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Set Actions:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
“Breakpoint Settings” window also offers that log message to Output window. At that you can make use of “Actions”. There are some special keywords are there, which have a special meaning when you use in the “Action” text box.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9LCbVxkWv2MHC8O3cH5R8-G9LTyIxUUbwiolu8EIaQBO2t1K2ypuRxTBkpGzUBMNUmd0C22WEfrhq9dxWM_qP77Ot_EpI9uEktrMTGa9ErUpimGA0WNv1MAbQ1iqpREATRrQJaQBOe6T9/s1600/Breakpoint-Window-Action-SpecialKeyword.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Breakpoint-Window-Action-SpecialKeyword&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9LCbVxkWv2MHC8O3cH5R8-G9LTyIxUUbwiolu8EIaQBO2t1K2ypuRxTBkpGzUBMNUmd0C22WEfrhq9dxWM_qP77Ot_EpI9uEktrMTGa9ErUpimGA0WNv1MAbQ1iqpREATRrQJaQBOe6T9/s1600/Breakpoint-Window-Action-SpecialKeyword.JPG&quot; title=&quot;Breakpoint-Window-Action-SpecialKeyword&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;em style=&quot;font-size: medium; text-align: left;&quot;&gt;Breakpoint-Window-Action-SpecialKeyword&lt;/em&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
When you specify Action alone, there is a checkbox named “Continue execution”, if you check this the breakpoint will not hit. You can see the message in the “Output Window”.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsLhQWFZt56ZoAt04Ryjeb1YCgTqLV-dE3pXXiy4UMays7ZkYY2IEhhCVBiAx-uXq6f8vgwXimUhhtRdgpYLR4gm7txtLRIzya1LsHqxJ4VhWXygOSqH3QdalpKTyyKKOd74DlYYCoNccn/s1600/Breakpoint-Window-Specify-Action.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Breakpoint-Window-Specify-Action&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsLhQWFZt56ZoAt04Ryjeb1YCgTqLV-dE3pXXiy4UMays7ZkYY2IEhhCVBiAx-uXq6f8vgwXimUhhtRdgpYLR4gm7txtLRIzya1LsHqxJ4VhWXygOSqH3QdalpKTyyKKOd74DlYYCoNccn/s1600/Breakpoint-Window-Specify-Action.jpg&quot; title=&quot;Breakpoint-Window-Specify-Action&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Breakpoint-Window-Specify-Action&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGTxi4uZ_F9gxt0ccQ9aIN7GRQFrA_CorPVBKZiQmKP4AXpzqf_2yt8r-vSZ5jkNN-eRqsS6Vu1Fij5YnpF_rvL0wKXxE1wWdwmLhpDdoBj0-wkNpP7wLuuxkIOHLJhU_t-p6yU-3v24an/s1600/Breakpoint-Window-Result-in-OutputWindow.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Breakpoint-Window-Result-in-OutputWindow&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGTxi4uZ_F9gxt0ccQ9aIN7GRQFrA_CorPVBKZiQmKP4AXpzqf_2yt8r-vSZ5jkNN-eRqsS6Vu1Fij5YnpF_rvL0wKXxE1wWdwmLhpDdoBj0-wkNpP7wLuuxkIOHLJhU_t-p6yU-3v24an/s1600/Breakpoint-Window-Result-in-OutputWindow.JPG&quot; title=&quot;Breakpoint-Window-Result-in-OutputWindow&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Breakpoint-Window-Result-in-OutputWindow&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&amp;nbsp; In the above action, we specify the special keyword &quot;$Function&quot;, which prints the current function name as you see in the above screen shot.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Disable Break points:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
In some cases, you may want to continue the execution of your program without hitting the breakpoints and later cases you may need them. At that time you can use the &quot;Disable Breakpoint&quot; option by using the short cut key &quot;Ctrl&amp;nbsp;+ F9&quot; key. Later cases, you can use the same short cut key to &quot;Enable Breakpoint&quot;. You can make use of these options during run time also.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY30lsPHrkjS5fOb5mKmmWwq9JrUKZbWZfC00ivLBphGiMuu2GtehyuRde9nlVcGeoYPiMDVdO6Da2noc0nYvCMyheSnl5aPii99iwfEKHeSUiYvHk5IDfK1mZGqj2QQe7pDkzh2NQuww2/s1600/Disabled-Breakpoint.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Disabled-Breakpoint&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY30lsPHrkjS5fOb5mKmmWwq9JrUKZbWZfC00ivLBphGiMuu2GtehyuRde9nlVcGeoYPiMDVdO6Da2noc0nYvCMyheSnl5aPii99iwfEKHeSUiYvHk5IDfK1mZGqj2QQe7pDkzh2NQuww2/s1600/Disabled-Breakpoint.JPG&quot; title=&quot;Disabled-Breakpoint&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Disabled-Breakpoint&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Readers, hopefully this tutorial helps you to understand about the various debugging options provided by Visual Studio. Let me know your thoughts as comments. Happy programming!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/6710338043844634935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/02/visual-studio-tips-and-tricks-13.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/6710338043844634935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/6710338043844634935'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/02/visual-studio-tips-and-tricks-13.html' title='Visual Studio Tips and Tricks -13 : Debugging with Visual Studio'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdTGLDQ4TCbw20aqCtkKZPhmFp0AhvkRfc-E6po89EAtc04mu-u9T_n3j2dbpZPT1B3zmEd2WwTW-cLx_cPbavg6gK31m4wQ9i2J_nnQfBhXuT9eyPjaspSUlvzepmbFHm9B_FvuadwjoG/s72-c/keep-calm-and-debug-on-3.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-7169597075136875575</id><published>2016-01-06T18:04:00.001-08:00</published><updated>2016-01-06T18:05:44.291-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CodeSnippets"/><title type='text'>Replace Special character from string using Regular expression in C#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In one of the forum post, the poster asked to &lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Remove all the special character &lt;/li&gt;
&lt;li&gt;Then Remove the space and replace with _ (underscore) character &lt;/li&gt;
&lt;/ol&gt;
Say for example, if he gave, the input string as “Levi Jeans (Blue) &amp;amp; yellow 101 – 150Ah” and the output he wants as “Levi_Jeans_Blue_yellow_101_150ah”.&lt;br /&gt;
&lt;strong&gt;Solution:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:csharp&quot; &gt;
            string yourInput = &quot;Levi Jeans (Blue) &amp; yellow 101 - 150Ah&quot;; 
            Regex rgx = new Regex(@&quot;[^a-zA-Z\d\s]&quot;); 
            // Replace Special Charater and space with emptystring 
            string finalOutput = rgx.Replace(yourInput,&quot;&quot;); 
            Console.WriteLine(finalOutput); 
            Regex rgx1 = new Regex(&quot;\\s+&quot;); 
            // Replace space with underscore 
            finalOutput = rgx1.Replace(finalOutput, &quot;_&quot;);
&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/7169597075136875575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/01/replace-special-character-from-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/7169597075136875575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/7169597075136875575'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/01/replace-special-character-from-string.html' title='Replace Special character from string using Regular expression in C#'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-3526143076705803550</id><published>2016-01-04T16:55:00.000-08:00</published><updated>2016-01-04T16:57:17.145-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Blogging"/><category scheme="http://www.blogger.com/atom/ns#" term="Open Live Editor"/><title type='text'>Open Live Writer–An alternative for Windows Live writer</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinO3Q6bA0WPwoQ1pbEU31tCiZ1pyrEPym-BQme2rp29Ukdyx9XeY1NjBFxL_ftQK8YzrKXL2SOrKd72C33lPLCWRIs-76_q0TcPI0ONp-WYO8ndwHqHST5AZP6l7ZkpAOTk45PDwNJKQN8/s1600-h/Open%252520Live%252520Writer%25255B2%25255D.png&quot;&gt;&lt;img alt=&quot;Open Live Writer&quot; border=&quot;0&quot; height=&quot;81&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTfM7KC5Lja3EZ44RPORDrtBPQZyPWFrjdc5kMwwwJhGVognxxAgUwFyFJppZXg0hEWYpqVwJLFgZ1ppsFCL2tIIEyVsx6Zt9M4GU1EWBv-iEmtXAH_yvQG4wyg4ZOo-v4eu7SLsTKZCF4/?imgmax=800&quot; style=&quot;background-image: none; border: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Open Live Writer&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For the last couple of year, i have used a windows essential tool called “Windows Live Writer” for blogging. Yes! It’s made my job easier. It reduces huge amount of work regarding formatting, insert images etc., in my blog post. Literally, I’m a big fan of it. &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; But most recently, Google changed it’s authentication mode and adopt a new authentication technique. So whenever you tried to post/publish a draft you will get the below error: &lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrJi_oiiMmv-s_iidcow0QY9m1CYYk8pvhxutHuXlT3Hv94_l2pwY2F6sJ8iA3iGWDGT87vf1Nl9GVaM94xt-PS926Nns51ioAzZSirGBPYUvUgvXmCWFUBXYfjesLBF24dAcuY_-x7bVA/s1600-h/WindowsLiveEditor_Issue%25255B2%25255D.jpg&quot;&gt;&lt;img alt=&quot;WindowsLiveEditor_Issue&quot; border=&quot;0&quot; height=&quot;145&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzYz5ntp5QLI_-I17hIaPvnhb9hWSan0PDl5BKb9K9-fj5jhM1vls-FedZ2bWmcDpLTJyWwPsaNzEWqdEaxKZtItmdo8mCYoL-YSWzeEqYHKnbeJhegMvYutvkOgPyVy0FRS_OIqkruM5w/?imgmax=800&quot; style=&quot;background-image: none; border: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;WindowsLiveEditor_Issue&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As a remedy, I Googled and Binged a lot and find an another alternative called “Open Live Writer”. You can download it from &lt;a href=&quot;http://www.openlivewriter.org/&quot;&gt;here&lt;/a&gt;. It’s a opensource editor, developed by a group of people inside and outside (.NetFoundation) Microsoft. If you want to participate you can get the source from: &lt;a href=&quot;https://github.com/OpenLiveWriter/OpenLiveWriter&quot;&gt;https://github.com/OpenLiveWriter/OpenLiveWriter&lt;/a&gt;. If you want to know about more &lt;a href=&quot;http://www.hanselman.com/blog/AnnouncingOpenLiveWriterAnOpenSourceForkOfWindowsLiveWriter.aspx&quot;&gt;Scott Hanselman’s post&lt;/a&gt; is very much helpful, which discusses removed features and features on the way in OLW etc., &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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; One of the main draw back that I found in OLW(Open Live Editor) is, it missed out the “Automatic spell check”, which I thought all bloggers love that. Another good news is you can run OLW and Windows Live Editor side by side.As a tweak for the “Spell Check Issue”, I’m still uses Windows Live Editor to draft my blog and publish it by OLW. Hope this tweak is still worth mentioning! &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg2PIEsbPGsmQj0A9X5i0w1cwZX6VQCZKNLgBh36P65dKZvbpSzFRgfXP65Hx_nCkE1gp544BDlu9_pbYcGy2984pjbRxvW7VcsRkYf-8JGt45ZZWc-3aVIREZP9XekfMl7bjX8PTIQt_4/s1600-h/wlEmoticon-smile%25255B2%25255D%25255B3%25255D.png&quot;&gt;&lt;img alt=&quot;wlEmoticon-smile[2]&quot; border=&quot;0&quot; height=&quot;23&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizt50m_hyphenhyphenNSOkhRCeVJzp0RFBv9GrxMOQf-uAZIxvJ3ExzJaW41kz-F3jYY2O4PNHR_XmqIAyiks70g-1b5frY-DVhjWYI0OsCUqK96uf0yE68eoucZq0nLCylzXfpYk7QqK3J86H-y1Nf/?imgmax=800&quot; style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;wlEmoticon-smile[2]&quot; width=&quot;23&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Hope this post will help for someone! &lt;img alt=&quot;Smile&quot; class=&quot;wlEmoticon wlEmoticon-smile&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA6X9keT1mYQWb_7B4fdEBWr5LUvCzYRbShqQoGt2O2ZbWi0LZwurB2zvk0LQP_tSOVQZuk7rhYPsugNB_-9jk_b1K0TfhBaqG46ECBEqfGYkYbZFlv3DYvDI6s-1q5Tgyjvl2YtGh4x-t/?imgmax=800&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/3526143076705803550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/01/open-live-writeran-alternative-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/3526143076705803550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/3526143076705803550'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/01/open-live-writeran-alternative-for.html' title='Open Live Writer–An alternative for Windows Live writer'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTfM7KC5Lja3EZ44RPORDrtBPQZyPWFrjdc5kMwwwJhGVognxxAgUwFyFJppZXg0hEWYpqVwJLFgZ1ppsFCL2tIIEyVsx6Zt9M4GU1EWBv-iEmtXAH_yvQG4wyg4ZOo-v4eu7SLsTKZCF4/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-5221639799622182979</id><published>2016-01-04T11:37:00.000-08:00</published><updated>2016-01-26T09:59:33.305-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Achievement"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharpCorner"/><title type='text'>December Month Winner in C# Corner</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJdlzoA1FL2Ko_dbkfTX_ITZFx5BasCUj-W3jQ2i8y6OVHLNcxbbN7Y0sluU1k45zcb_7l9I8EnpTXEwMcIihmRP4nhbVoVIcL4AZ21MVWTeTNJix0R7vjAwSrdE4ZcRixRfkLwddI-sz7/s1600-h/DecemberMonthWinner%25255B2%25255D.jpg&quot;&gt;&lt;img alt=&quot;DecemberMonthWinner&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNa2rT_l3TfcckGcGpkMNAgMzOuEb6YbnsdcBSnaxmblinbFC86TpsCfRhBf_YmBKlfQhelGqa0ex8jSu8z7aVNyVQGvGiKkYOtHxPUZOTdaV3H4_OKHx2jX9k4zEFBmuGVDjKjcGRYqNp/?imgmax=800&quot; style=&quot;background-image: none; border: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;DecemberMonthWinner&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I’m very much happy to announce that, I’m also one of the monthly winner in C#Corner for the month December 2015. This month award is something special to me since third time in a row, I received this award. I’m very much happy and thankful to all of my readers,friends and colleague who are all always improves me a lot!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/5221639799622182979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/01/december-month-winner-in-c-corner.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/5221639799622182979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/5221639799622182979'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/01/december-month-winner-in-c-corner.html' title='December Month Winner in C# Corner'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNa2rT_l3TfcckGcGpkMNAgMzOuEb6YbnsdcBSnaxmblinbFC86TpsCfRhBf_YmBKlfQhelGqa0ex8jSu8z7aVNyVQGvGiKkYOtHxPUZOTdaV3H4_OKHx2jX9k4zEFBmuGVDjKjcGRYqNp/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-5052702600950149337</id><published>2016-01-03T10:57:00.000-08:00</published><updated>2016-01-26T10:00:25.715-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Achievement"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharpCorner"/><category scheme="http://www.blogger.com/atom/ns#" term="MVP"/><title type='text'>Got My New Year Gift : Officially CSharpCorner MVP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp1GQw0RkvFDS9lEGi90MXxiGMCnXnDYhyphenhyphenu4QSJnkLR7UFzaTVCEX7uCTuANXeDclOOx78uvlHpc3ylMWDdhueqVcl-9cv964ZAyRg2mHcW4zzX1c503mBs3B3fGz8fz2qDNghrVEwSxlr/s1600-h/CSharpCorner_MVP_2016%25255B2%25255D.jpg&quot;&gt;&lt;img alt=&quot;CSharpCorner_MVP_2016&quot; border=&quot;0&quot; height=&quot;277&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXCL4lKCnQX7fG_BNd5GAtdPFzdG1VvFpBW2GQEUh6gSXGkx-QcVavuwRKpN8ujs-7M0DGrhdegDKUXp6A02jAZFojqCRtkKQeEhg-vmhsBYBTwdq1RDdxamirpP_gOLWWO06AXxNct9tv/?imgmax=800&quot; style=&quot;background-image: none; border: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;CSharpCorner_MVP_2016&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I’m very much happy to announce that I got awarded as C# Corner MVP for 2016. I officially received a mail from C# Corner on 2nd Jan 2016. I believe this is one of my biggest milestone achievement in my carrier, since this is my first MVP award. This award really induce me more to achieve new heights within ASP.Net community. Without my family support this award is not possible, especially my Mother, Dad, “Lovely” Wife and my Son “LittleMaster” Subin. My hearty thanks to C# Corner Team, Friends and my colleagues!!! Congrats to all the other winners also,&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; Personally, I want to dedicate this award to my close “late” friend SathyaSeelan. Really i miss you Sathya, I believe you are always with me!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/5052702600950149337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/01/got-my-new-year-gift-officially.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/5052702600950149337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/5052702600950149337'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2016/01/got-my-new-year-gift-officially.html' title='Got My New Year Gift : Officially CSharpCorner MVP'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXCL4lKCnQX7fG_BNd5GAtdPFzdG1VvFpBW2GQEUh6gSXGkx-QcVavuwRKpN8ujs-7M0DGrhdegDKUXp6A02jAZFojqCRtkKQeEhg-vmhsBYBTwdq1RDdxamirpP_gOLWWO06AXxNct9tv/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-8754919763254433715</id><published>2015-12-25T06:58:00.000-08:00</published><updated>2016-05-11T16:50:39.257-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="CRUD"/><title type='text'>CRUD Operation - ASP.Net MVC with ADO.Net</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbxSkFuJYpmyj9ugH6gz0zfSSynKs11qHqXdScRHDp0ATGx_Etb6HPz30yaERT2AefwjBPt_I5__R7VohnOaBS3_v9MDBzkZ1WYoP7wfcbTsM1FT75dTp6kWGnqKHxCm6vTH2VBArJfkgZ/s1600/CRUD.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbxSkFuJYpmyj9ugH6gz0zfSSynKs11qHqXdScRHDp0ATGx_Etb6HPz30yaERT2AefwjBPt_I5__R7VohnOaBS3_v9MDBzkZ1WYoP7wfcbTsM1FT75dTp6kWGnqKHxCm6vTH2VBArJfkgZ/s400/CRUD.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; In this post, I’m going to discuss about the CRUD(Create, Read, Update and Delete) Operation in an ASP.Net MVC application by using raw ADO.Net. Most of the new learners, who started to learn MVC asked this frequently. That’s the main reason behind this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Configuration:&lt;/strong&gt;&lt;br /&gt;
For this particular application, I have used the below configuration:&lt;br /&gt;
1. Visual Studio 2015&lt;br /&gt;
2. SQL Server 2008&lt;br /&gt;
In order to keep my hand clean, I have used a simple table to do the CRUD operation. &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 1: &lt;/strong&gt;&lt;br /&gt;
Execute the below script on your DB&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER ON 
GO

SET ANSI_PADDING ON 
GO

CREATE TABLE [dbo].[tblStudent]( 
    [student_id] [int] IDENTITY(1,1) NOT NULL, 
    [student_name] [varchar](50) NOT NULL, 
    [stduent_age] [int] NOT NULL, 
    [student_gender] [varchar](6) NOT NULL, 
CONSTRAINT [PK_tblStudent] PRIMARY KEY CLUSTERED 
( 
    [student_id] ASC 
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY] 
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF 
GO

&lt;/pre&gt;
&lt;br /&gt;
&lt;strong&gt;Step 2:&lt;/strong&gt;&lt;br /&gt;
Create an “Empty” ASP.Net.MVC 4 application in Visual Studio 2015. &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuSHp2onRsc5CS1B7xd7kg_vcrAofmvsx-iVh0cR8LtXWjqlTwEPB9R6yp6N_JNZRKdX9L2w6bgO8XlKy47KXkVu8JaFEgJZxHMKQE8wNn9ckiF2cCG3-DVxGQNXZNU3a1sZs8D-9jxgf4/s1600-h/Empty-MVC-Project2.png&quot;&gt;&lt;img alt=&quot;Empty-MVC-Project&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq761dQQ-yoRla7Ep1-X3o6My89dQKR3xYdEktGRxjmMYJqD-RzjbTZLwBJ-q3wNecAraPav6l5Xcr-JqpjUJNKk1SLGOM7eI2Pi78W5lIn4PowL6iUyoTV532tHRHHcyNBW3nngts03Bg/?imgmax=800&quot; style=&quot;background-image: none; border-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Empty-MVC-Project&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 3:&lt;/strong&gt;&lt;br /&gt;
Add an “Empty” Controller by right clicking on the “Controller” folder select “Add” then select “Controller..”. In the popup select “MVC 5 Controller” then click “Add”. In the next popup you should give the name of the as “CRUDController”.&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhvcgtYp0dG9Dqg6QOGeQJHskZjWgNx78zngvC_yu1WBBXX5RxzeoRubthSXDZG0xdwS835FBvs8l1UNcusTUq_GJFWfFbdfXlPPM8toqzuAtgKN7r76QueuEH0lEYIqaXknEF7ZnjmLhz/s1600-h/Add-Empty-Controller2.png&quot;&gt;&lt;img alt=&quot;Add-Empty-Controller&quot; border=&quot;0&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjULNfJDiUeX5J0gvRh333e9Ifw-jWXQfLLVTMHAoZYlc8Pnq2B4CGYNxb9Dy1X39TNgZfHPgGhh9hrzmSCF2fs5FEyGUN5anVJu517On2ygPdjJ9vqay1updGyLGPVYvMZ2opO6_DwAzKr/?imgmax=800&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Add-Empty-Controller&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
After add the controller, you may noticed as per the “convention” in ASP.Net MVC under the “Views” folder, a new folder named “CRUD” also created.&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz9Dn9dRvrpMTBNWgJvZ4V9RWFsSKzvWjJz6pcPQgzNeLZbTpjjd4oyUxMJpJ2NPHOhW1Kza3ohqdk_KxCUhLXNFZoGzFZ-7KGVFJRcrbAXF989N7WE9ZGbSyNaiQXbEwHHSfluswrClgJ/s1600-h/Convention-Over-Configuration2.png&quot;&gt;&lt;img alt=&quot;Convention-Over-Configuration&quot; border=&quot;0&quot; height=&quot;177&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVM9nwf6BSlb-IZYJZmi9rq64k3WjB422GlsBult7LjW6QhY0erpQL7tiUlV5_-BBz49I0kzHNtQmVQ7f-PoNqhUVIMdMhAkjEUYTemdpn-RgOZvDmbQW6Z4J7si24g9GhCnRMQodC49DJ/?imgmax=800&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Convention-Over-Configuration&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 4:&lt;/strong&gt;&lt;br /&gt;
Our DB access code are going to be placed inside the “Models” folder. Model is just a “Class” file.&amp;nbsp; So we are going to create a Model class for our purpose as below:&lt;br /&gt;
1. Right click on the “Model” folder. In the context menu select “Add” then choose “New item..”. &lt;br /&gt;
2. In the popup, select “Code” then choose “Class” and name the class file as “CRUDModel” then click “Add”. That’s all!&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3y9Q5LEuUkNqFWeqwkO2s1-iQghabc9B70wLSkdbicA3rSMjxgPSFebXL3PGovARIJrCUC8tpkIJAhzx2UC2ATZj_dSqtCYgCa0BaU-ylWpTlE0C7Hs89FpCbX0eBK9ML9P5kYFLsTnSO/s1600-h/Add-Empty-Model2.jpg&quot;&gt;&lt;img alt=&quot;Add-Empty-Model&quot; border=&quot;0&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghZP2NRQwk5Ezl-nVs-2eLGKQy5p71BQqpNwv51Ux753yoB7iltCBhhquBp_Gc9erMSDBM8osn9PGTip1Mu6jNPmKpma-3HJcHmvRYiejTZr8_5VuRavbjqra6AF9WMc22ElPU2Dpe2q06/?imgmax=800&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Add-Empty-Model&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;strong&gt;Step 5:&lt;/strong&gt;&lt;br /&gt;
Till now we created classes for “Controller” and “Model”. We didn’t create any views till now. In this step we are going to create a view, which is going to act as a “home” page for our application. In order to create the view:&lt;br /&gt;
1. Right click on the “CRUD” folder under the “Views” folder in the context menu select “Add” then choose “View..”. &lt;br /&gt;
2. In the popup, give “View Name” and uncheck the “Use a layout page” checkbox. Finally click “Add” button. &lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqLXsMoIddwjJ04gro0Mf61E-9G5CP-B4BLdp4hrMaraR-RTANDx7FJu_eIIOfvH7o0LLyhpLWFwBBAoDFwdvcYGTg_CCvOTfGdGcK4AfRJlPfJg9lYb-saX3X2OD3862BVV7FIgYxESYI/s1600-h/Add-View%25255B2%25255D.jpg&quot;&gt;&lt;img alt=&quot;Add-View&quot; border=&quot;0&quot; height=&quot;139&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTz8Xsy1KH9E0UnisFi1icfwHTPxIhkoWXusZazQsoUEWVSo1CZeqVST8UwQ2TNitqwvcikmy2X_ZMfYhg99hyHDLB9ExFaL9vyzIns0NL50Z-mX3yy-fv2w2yqrF78brlRM7X63xoI2Ig/?imgmax=800&quot; style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Add-View&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;strong&gt;Step 6:&lt;/strong&gt;&lt;br /&gt;
We don’t have a controller named “Default”, which is specified in the “RouteConfig.cs” file. We need to change the controller’s name as “CRUD”, in the default route values. &lt;br /&gt;
&lt;em&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;Route.config:&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.Mvc; 
using System.Web.Routing;

namespace MVCWithADO 
{ 
    public class RouteConfig 
    { 
        public static void RegisterRoutes(RouteCollection routes) 
        { 
            routes.IgnoreRoute(&quot;{resource}.axd/{*pathInfo}&quot;);

            routes.MapRoute( 
                name: &quot;Default&quot;, 
                url: &quot;{controller}/{action}/{id}&quot;, 
                defaults: new { controller = &quot;CRUD&quot;, action = &quot;Index&quot;, id = UrlParameter.Optional } 
            ); 
        } 
    } 
} 

&lt;/pre&gt;
&lt;br /&gt;
After the above change, just press F5 in visual studio, to verify that our application works fine without any error. &lt;br /&gt;
&lt;strong&gt;Step 7:&lt;/strong&gt;&lt;br /&gt;
In order to achieve the complete CRUD operation, I’m going to add number of views as described in the Step 5. Here is the complete list of views and it’s purpose.&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; style=&quot;width: 685px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;View&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;483&quot;&gt;Purpose&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;Home.cshtml&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;483&quot;&gt;This is the default view. Loaded when the application&lt;br /&gt;
launched. Will display all the records in the table&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;Create.cshtml&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;483&quot;&gt;Displays control’s to insert the record. Will be rendered&lt;br /&gt;
when the “Add New Record” button clicked on&lt;br /&gt;
the “Home.cshtml” view.&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;Edit.cshtml&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;483&quot;&gt;Displays control’s to edit the record. Will be rendered&lt;br /&gt;
when the “Edit” button clicked on the “Home.cshtml” view.&lt;/td&gt;     &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;strong&gt;Step 8:&lt;/strong&gt;&lt;br /&gt;
The model class, contains the all the “Data Access” logic. In other words, it will interact with Database and give it back to “View” thru “Controller”.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;using System.Data; 
using System.Data.SqlClient;

namespace MVCWithADO.Models 
{ 
    public class CRUDModel 
    { 
        /// &lt;summary&gt; 
        /// Get all records from the DB 
        /// &lt;/summary&gt; 
        /// &lt;returns&gt;Datatable&lt;/returns&gt; 
        public DataTable GetAllStudents() 
        { 
            DataTable dt = new DataTable(); 
            string strConString =@&quot;Data Source=WELCOME-PC\SQLSERVER2008;Initial Catalog=MyDB;Integrated Security=True&quot;; 
            using (SqlConnection con = new SqlConnection(strConString)) 
            { 
                con.Open(); 
                SqlCommand cmd = new SqlCommand(&quot;Select * from tblStudent&quot;, con); 
                SqlDataAdapter da = new SqlDataAdapter(cmd); 
                da.Fill(dt); 
            } 
            return dt; 
        }

        /// &lt;summary&gt; 
        /// Get student detail by Student id 
        /// &lt;/summary&gt; 
        /// &lt;param name=&quot;intStudentID&quot; /&gt; 
        /// &lt;returns&gt;&lt;/returns&gt; 
        public DataTable GetStudentByID(int intStudentID) 
        { 
            DataTable dt = new DataTable();

            string strConString = @&quot;Data Source=WELCOME-PC\SQLSERVER2008;Initial Catalog=MyDB;Integrated Security=True&quot;;

            using (SqlConnection con = new SqlConnection(strConString)) 
            { 
                con.Open(); 
                SqlCommand cmd = new SqlCommand(&quot;Select * from tblStudent where student_id=&quot; + intStudentID, con); 
                SqlDataAdapter da = new SqlDataAdapter(cmd); 
                da.Fill(dt); 
            } 
            return dt; 
        }

        /// &lt;summary&gt; 
        /// Update the student details 
        /// &lt;/summary&gt; 
        /// &lt;param name=&quot;intStudentID&quot; /&gt; 
        /// &lt;param name=&quot;strStudentName&quot; /&gt; 
        /// &lt;param name=&quot;strGender&quot; /&gt; 
        /// &lt;param name=&quot;intAge&quot; /&gt; 
        /// &lt;returns&gt;&lt;/returns&gt; 
        public int UpdateStudent(int intStudentID, string strStudentName, string strGender, int intAge) 
        { 
            string strConString = @&quot;Data Source=WELCOME-PC\SQLSERVER2008;Initial Catalog=MyDB;Integrated Security=True&quot;;

            using (SqlConnection con = new SqlConnection(strConString)) 
            { 
                con.Open(); 
                string query = &quot;Update tblStudent SET student_name=@studname, student_age=@studage , student_gender=@gender where student_id=@studid&quot;; 
                SqlCommand cmd = new SqlCommand(query, con); 
                cmd.Parameters.AddWithValue(&quot;@studname&quot;, strStudentName); 
                cmd.Parameters.AddWithValue(&quot;@studage&quot;, intAge); 
                cmd.Parameters.AddWithValue(&quot;@gender&quot;, strGender); 
                cmd.Parameters.AddWithValue(&quot;@studid&quot;, intStudentID); 
                return cmd.ExecuteNonQuery(); 
            } 
        }

        /// &lt;summary&gt; 
        /// Insert Student record into DB 
        /// &lt;/summary&gt; 
        /// &lt;param name=&quot;strStudentName&quot; /&gt; 
        /// &lt;param name=&quot;strGender&quot; /&gt; 
        /// &lt;param name=&quot;intAge&quot; /&gt; 
        /// &lt;returns&gt;&lt;/returns&gt; 
        public int InsertStudent(string strStudentName, string strGender, int intAge) 
        { 
            string strConString = @&quot;Data Source=WELCOME-PC\SQLSERVER2008;Initial Catalog=MyDB;Integrated Security=True&quot;;

            using (SqlConnection con = new SqlConnection(strConString)) 
            { 
                con.Open(); 
                string query = &quot;Insert into tblStudent (student_name, student_age,student_gender) values(@studname, @studage , @gender)&quot;; 
                SqlCommand cmd = new SqlCommand(query, con); 
                cmd.Parameters.AddWithValue(&quot;@studname&quot;, strStudentName); 
                cmd.Parameters.AddWithValue(&quot;@studage&quot;, intAge); 
                cmd.Parameters.AddWithValue(&quot;@gender&quot;, strGender); 
                return cmd.ExecuteNonQuery(); 
            } 
        }

        /// &lt;summary&gt; 
        /// Delete student based on ID 
        /// &lt;/summary&gt; 
        /// &lt;param name=&quot;intStudentID&quot; /&gt; 
        /// &lt;returns&gt;&lt;/returns&gt; 
        public int DeleteStudent(int intStudentID) 
        { 
            string strConString = @&quot;Data Source=WELCOME-PC\SQLSERVER2008;Initial Catalog=MyDB;Integrated Security=True&quot;;

            using (SqlConnection con = new SqlConnection(strConString)) 
            { 
                con.Open(); 
                string query = &quot;Delete from tblStudent where student_id=@studid&quot;; 
                SqlCommand cmd = new SqlCommand(query, con); 
                cmd.Parameters.AddWithValue(&quot;@studid&quot;, intStudentID); 
                return cmd.ExecuteNonQuery(); 
            } 
        } 
    } 
}



&lt;/pre&gt;
&lt;br /&gt;
&lt;strong&gt;Controller:&lt;/strong&gt;&lt;br /&gt;
Controller &lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.Mvc; 
using System.Data; 
using System.Data.SqlClient; 
using MVCWithADO.Models; 
namespace MVCWithADO.Controllers 
{ 
    public class CRUDController : Controller 
    { 
        /// &lt;summary&gt; 
        /// First Action method called when page loads 
        /// Fetch all the rows from DB and display it 
        /// &lt;/summary&gt; 
        /// &lt;returns&gt;Home View&lt;/returns&gt; 
        public ActionResult Index() 
        { 
            CRUDModel model = new CRUDModel(); 
            DataTable dt = model.GetAllStudents(); 
            return View(&quot;Home&quot;,dt); 
        }

        /// &lt;summary&gt; 
        /// Action method, called when the &quot;Add New Record&quot; link clicked 
        /// &lt;/summary&gt; 
        /// &lt;returns&gt;Create View&lt;/returns&gt; 
        public ActionResult Insert() 
        { 
            return View(&quot;Create&quot;); 
        }

        /// &lt;summary&gt; 
        /// Action method, called when the user hit &quot;Submit&quot; button 
        /// &lt;/summary&gt; 
        /// &lt;param name=&quot;frm&quot; /&gt;Form Collection  Object 
        /// &lt;param name=&quot;action&quot; /&gt;Used to differentiate between &quot;submit&quot; and &quot;cancel&quot; 
        /// &lt;returns&gt;&lt;/returns&gt; 
        public ActionResult InsertRecord(FormCollection frm, string action) 
        { 
            if (action == &quot;Submit&quot;) 
            { 
                CRUDModel model = new CRUDModel(); 
                string name = frm[&quot;txtName&quot;]; 
                int age = Convert.ToInt32(frm[&quot;txtAge&quot;]); 
                string gender = frm[&quot;gender&quot;]; 
                int status = model.InsertStudent(name, gender, age); 
                return RedirectToAction(&quot;Index&quot;); 
            } 
            else 
            { 
                return RedirectToAction(&quot;Index&quot;); 
            } 
        }

        /// &lt;summary&gt; 
        /// Action method called when the user click &quot;Edit&quot; Link 
        /// &lt;/summary&gt; 
        /// &lt;param name=&quot;StudentID&quot; /&gt;Student ID 
        /// &lt;returns&gt;Edit View&lt;/returns&gt; 
        public ActionResult Edit(int StudentID) 
        { 
            CRUDModel model = new CRUDModel(); 
            DataTable dt = model.GetStudentByID(StudentID); 
            return View(&quot;Edit&quot;, dt); 
        }

        /// &lt;summary&gt; 
        /// Actin method, called when user update the record or cancel the update. 
        /// &lt;/summary&gt; 
        /// &lt;param name=&quot;frm&quot; /&gt;Form Collection 
        /// &lt;param name=&quot;action&quot; /&gt;Denotes the action 
        /// &lt;returns&gt;Home view&lt;/returns&gt; 
        public ActionResult UpdateRecord(FormCollection frm,string action) 
        { 
            if (action == &quot;Submit&quot;) 
            { 
                CRUDModel model = new CRUDModel(); 
                string name = frm[&quot;txtName&quot;]; 
                int age = Convert.ToInt32(frm[&quot;txtAge&quot;]); 
                string gender = frm[&quot;gender&quot;]; 
                int id = Convert.ToInt32(frm[&quot;hdnID&quot;]); 
                int status = model.UpdateStudent(id, name, gender, age); 
                return RedirectToAction(&quot;Index&quot;); 
            } 
            else 
            { 
                return RedirectToAction(&quot;Index&quot;); 
            } 
        }

        /// &lt;summary&gt; 
        /// Action method called when the &quot;Delete&quot; link clicked 
        /// &lt;/summary&gt; 
        /// &lt;param name=&quot;StudentID&quot; /&gt;Stutend ID to edit 
        /// &lt;returns&gt;Home view&lt;/returns&gt; 
        public ActionResult Delete(int StudentID) 
        { 
            CRUDModel model = new CRUDModel(); 
            model.DeleteStudent(StudentID); 
            return RedirectToAction(&quot;Index&quot;); 
        } 
    } 
}


&lt;/pre&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Views:&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Create.cshtml&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;

&amp;lt;html&amp;gt;    

&amp;lt;head&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta name=&quot;viewport&quot; content=&quot;width=device-width&quot; /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;Insert&amp;lt;/title&amp;gt;     

&amp;lt;/head&amp;gt;     

&amp;lt;body&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form id=&quot;frmDetail&quot; method=&quot;post&quot; action=&quot;@Url.Action(&quot;InsertRecord&quot;)&quot;&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Enter Name:&amp;lt;input name=&quot;txtName&quot; /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;br /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Enter Age:&amp;lt;input name=&quot;txtAge&quot; /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;br /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select Gender: &amp;lt;input type=&quot;radio&quot; name=&quot;gender&quot; value=&quot;male&quot; checked&amp;gt;Male     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;radio&quot; name=&quot;gender&quot; value=&quot;female&quot;&amp;gt;Female     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;br /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;submit&quot; value=&quot;Submit&quot; name=&quot;action&quot; /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;submit&quot; value=&quot;Cancel&quot; name=&quot;action&quot; /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt;     

&amp;lt;/body&amp;gt;     

&amp;lt;/html&amp;gt;    

&lt;/pre&gt;
&lt;strong&gt;Home.cshtml:&lt;/strong&gt;&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;@using System.Data    

@using System.Data.SqlClient     

@model System.Data.DataTable     

@{     

&amp;nbsp;&amp;nbsp;&amp;nbsp; Layout = null;     

}

&amp;lt;!DOCTYPE html&amp;gt;

&amp;lt;html&amp;gt;    

&amp;lt;head&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta name=&quot;viewport&quot; content=&quot;width=device-width&quot; /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;Home&amp;lt;/title&amp;gt;     

&amp;lt;/head&amp;gt;     

&amp;lt;body&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form method=&quot;post&quot; name=&quot;Display&quot;&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;h2&amp;gt;Home&amp;lt;/h2&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Html.ActionLink(&quot;Add New Record&quot;, &quot;Insert&quot;)     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;br /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @{     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (Model.Rows.Count &amp;gt; 0)     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;table&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;thead&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Student ID     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/td&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/td&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Age     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/td&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Gender&amp;lt;/td&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/thead&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @foreach (DataRow dr in Model.Rows)     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;@dr[&quot;student_id&quot;].ToString()&amp;nbsp; &amp;lt;/td&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;@dr[&quot;student_name&quot;].ToString()&amp;nbsp; &amp;lt;/td&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;@dr[&quot;student_age&quot;].ToString()&amp;nbsp; &amp;lt;/td&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;@dr[&quot;student_gender&quot;].ToString()&amp;nbsp; &amp;lt;/td&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;@Html.ActionLink(&quot;Edit &quot;, &quot;Edit&quot;, new { StudentID = dr[&quot;student_id&quot;].ToString() })&amp;lt;/td&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;@Html.ActionLink(&quot;| Delete&quot;, &quot;Delete&quot;, new { StudentID = dr[&quot;student_id&quot;].ToString() })&amp;lt;/td&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/table&amp;gt;    

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;br /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;span&amp;gt; No records found!!&amp;lt;/span&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt;    

&amp;lt;/body&amp;gt;     

&amp;lt;/html&amp;gt;     

&lt;/pre&gt;
&lt;strong&gt;Edit.cshtml&lt;/strong&gt;&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;@using System.Data    

@using System.Data.SqlClient     

@model System.Data.DataTable     

@{     

&amp;nbsp;&amp;nbsp;&amp;nbsp; ViewBag.Title = &quot;EditView&quot;;     

}     

&amp;lt;html&amp;gt;     

&amp;lt;head&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;     

&amp;lt;/head&amp;gt;     

&amp;lt;body&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form id=&quot;frmDetail&quot; method=&quot;post&quot; action=&quot;@Url.Action(&quot;UpdateRecord&quot;)&quot;&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Enter Name:&amp;lt;input name=&quot;txtName&quot; value=&quot;@Model.Rows[0][&quot;student_name&quot;]&quot; /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;br /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Enter Age:&amp;lt;input name=&quot;txtAge&quot; value=&quot;@Model.Rows[0][&quot;student_age&quot;]&quot; /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;br /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select Gender:

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @if (Model.Rows[0][&quot;student_gender&quot;].ToString().ToLower() == &quot;male&quot;)    

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;radio&quot; name=&quot;gender&quot; value=&quot;male&quot; checked /&amp;gt; @Html.Raw(&quot;Male&quot;)     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;radio&quot; name=&quot;gender&quot; value=&quot;female&quot; /&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Html.Raw(&quot;Female&quot;)     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;radio&quot; name=&quot;gender&quot; value=&quot;male&quot;&amp;gt;&amp;nbsp; @Html.Raw(&quot;Male&quot;)     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;radio&quot; name=&quot;gender&quot; value=&quot;female&quot; checked /&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Html.Raw(&quot;Female&quot;)     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;hidden&quot; name=&quot;hdnID&quot; value=&quot;@Model.Rows[0][&quot;student_id&quot;]&quot; /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;br /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;submit&quot; value=&quot;Submit&quot; name=&quot;action&quot; /&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;submit&quot; value=&quot;Cancel&quot; name=&quot;action&quot;/&amp;gt;     

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt;     

&amp;lt;/body&amp;gt;     

&amp;lt;/html&amp;gt;   &lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/8754919763254433715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/12/crud-operation-aspnet-mvc-with-adonet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/8754919763254433715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/8754919763254433715'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/12/crud-operation-aspnet-mvc-with-adonet.html' title='CRUD Operation - ASP.Net MVC with ADO.Net'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbxSkFuJYpmyj9ugH6gz0zfSSynKs11qHqXdScRHDp0ATGx_Etb6HPz30yaERT2AefwjBPt_I5__R7VohnOaBS3_v9MDBzkZ1WYoP7wfcbTsM1FT75dTp6kWGnqKHxCm6vTH2VBArJfkgZ/s72-c/CRUD.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-8602037337221024420</id><published>2015-12-06T10:00:00.001-08:00</published><updated>2016-01-26T10:00:57.928-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Achievement"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharpCorner"/><title type='text'>November Month Winner In C# Corner</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO7H92_TPOht_C3ahmrQOwVX4t6p2GFIwW7IlP38v1erNe4wkgaIZxptQnfeZ8bM-Nh2MD-kjRUldt8tD6vvzJj3fZQ3Ux_kboIbtdgVAH-_MZKskyvpS0wnyHbY4gdrXHKnkRrAAT1qWV/s1600/Nov-2015.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;296&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO7H92_TPOht_C3ahmrQOwVX4t6p2GFIwW7IlP38v1erNe4wkgaIZxptQnfeZ8bM-Nh2MD-kjRUldt8tD6vvzJj3fZQ3Ux_kboIbtdgVAH-_MZKskyvpS0wnyHbY4gdrXHKnkRrAAT1qWV/s400/Nov-2015.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I&#39;m very much excited to announce that I am again in the monthly winners list of C# Corner. This is second time in a row I&#39;m really happy about that! This recognition really boost me up towards more community contribution as well as increase my responsibility in the ASP.Net Community. I want to thank my friends, colleagues who are all always encourage me! &amp;nbsp;Thanks to every one! :)&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/8602037337221024420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/12/november-month-winner-in-c-corner.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/8602037337221024420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/8602037337221024420'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/12/november-month-winner-in-c-corner.html' title='November Month Winner In C# Corner'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO7H92_TPOht_C3ahmrQOwVX4t6p2GFIwW7IlP38v1erNe4wkgaIZxptQnfeZ8bM-Nh2MD-kjRUldt8tD6vvzJj3fZQ3Ux_kboIbtdgVAH-_MZKskyvpS0wnyHbY4gdrXHKnkRrAAT1qWV/s72-c/Nov-2015.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-7105416944488265363</id><published>2015-11-10T18:27:00.003-08:00</published><updated>2016-01-26T10:01:30.591-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Achievement"/><category scheme="http://www.blogger.com/atom/ns#" term="Awards&amp;Honors"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharpCorner"/><title type='text'>October month winner in C#Corner</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I’m very much delight to announce that, I have selected one of the monthly winner for the month October 2015.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg212RZ1IR_K-ZmQHwkOEXOyIWYSRdCe3YIYVh8EboLTCE-d6ceo2O2sAPvxtow7zl2ymTk8vTeYKZXINuAJDpvJNPRfKi9COUb9_P6v1iebCINZe5RicI7e7hl9llMB-s1vpRKu_9TROnH/s1600/Oct-2015.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;343&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg212RZ1IR_K-ZmQHwkOEXOyIWYSRdCe3YIYVh8EboLTCE-d6ceo2O2sAPvxtow7zl2ymTk8vTeYKZXINuAJDpvJNPRfKi9COUb9_P6v1iebCINZe5RicI7e7hl9llMB-s1vpRKu_9TROnH/s400/Oct-2015.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
I’m very much happy and thankful to all of my readers,friends and colleague who are all always improves me a lot! :)&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/7105416944488265363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/11/october-month-winner-in-ccorner.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/7105416944488265363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/7105416944488265363'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/11/october-month-winner-in-ccorner.html' title='October month winner in C#Corner'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg212RZ1IR_K-ZmQHwkOEXOyIWYSRdCe3YIYVh8EboLTCE-d6ceo2O2sAPvxtow7zl2ymTk8vTeYKZXINuAJDpvJNPRfKi9COUb9_P6v1iebCINZe5RicI7e7hl9llMB-s1vpRKu_9TROnH/s72-c/Oct-2015.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-8754388464541271713</id><published>2015-10-25T02:00:00.000-07:00</published><updated>2015-10-25T15:11:23.479-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CodeProject"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio Tips and Tricks"/><title type='text'>Visual Studio : How to install Nuget packages in your project?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In this article I’m going to explain about how to install/uninstall Nuget packages for your application in Visual Studio using “Nuget Package Manager” and “Package Manager Console”. I assume that you have Visual Studio 2013/2015 on your machine.&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; Before that, if you are not aware about “Nuget” means, the below sentence is for you:&lt;br /&gt;
&lt;em&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; “NuGet is the package manager for the Microsoft development platform including .NET. The NuGet client tools provide the ability to produce and consume packages. The NuGet Gallery is the central package repository used by all package authors and consumers.”&lt;/em&gt;&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Install Nuget Package using ‘Nuget Package Manager’:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Step 1:&lt;/strong&gt; &lt;br /&gt;
Rightclick on your project and select&amp;nbsp; “Manage Nuget Packages”.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU9bmRctQlysT6A7VoHmLv-QCQgYygtT2JsrgAjCVK9DdTq7ChyphenhyphentRiqqMU08jDcOruAe-NNox19sczHlfPEO0VAiS_p9X3Pt0wTXg1CpyLAewSuVNY7q8NwzfVoW3zMg3ZrHQOlaiLpwvb/s1600/SolutionExplorerMenu.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU9bmRctQlysT6A7VoHmLv-QCQgYygtT2JsrgAjCVK9DdTq7ChyphenhyphentRiqqMU08jDcOruAe-NNox19sczHlfPEO0VAiS_p9X3Pt0wTXg1CpyLAewSuVNY7q8NwzfVoW3zMg3ZrHQOlaiLpwvb/s1600/SolutionExplorerMenu.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 2:&lt;/strong&gt;&lt;br /&gt;
Now the “Nuget Package Manager” window will appear with the list of nuget packages.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqhEVq1lo4DAAceEDYuZ-SF9Re4DaGO2GVgWiQWOaQDozTJAGX0YIVRyd3MDrZIuXmGgadGb6B7EubkT8fx_xt9_2d5Igcg2fPA-W7EEFt4YigKS2ZWnKNgMR6IoRn_gAlGpAZ0c5eGTws/s1600/Nuget_Package_Manager.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqhEVq1lo4DAAceEDYuZ-SF9Re4DaGO2GVgWiQWOaQDozTJAGX0YIVRyd3MDrZIuXmGgadGb6B7EubkT8fx_xt9_2d5Igcg2fPA-W7EEFt4YigKS2ZWnKNgMR6IoRn_gAlGpAZ0c5eGTws/s1600/Nuget_Package_Manager.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;Step 3:&lt;/strong&gt;&lt;br /&gt;
In the search box, type the package you look for and hit enter. In this example, I just searched for “routedebugger” package and installed it by clicking the “Install” button.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidivPcm4h_hCKha-kmfaE3xO4aYJXPWcTVqwenFPZpeA5WpspykW7Z2RD96WY1PJg0B8Q3lyOtbRGOWlRh1fRlxgf_0W-z0XKYqFWQHU9pm35Dmjlaf_P5Dkf1G5R8yk6Wfvw_okxwcAoL/s1600/Install_Nuget_Package.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidivPcm4h_hCKha-kmfaE3xO4aYJXPWcTVqwenFPZpeA5WpspykW7Z2RD96WY1PJg0B8Q3lyOtbRGOWlRh1fRlxgf_0W-z0XKYqFWQHU9pm35Dmjlaf_P5Dkf1G5R8yk6Wfvw_okxwcAoL/s1600/Install_Nuget_Package.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;Step 4:&lt;/strong&gt;&lt;br /&gt;
While installing if the downloaded package tries to change the files in the solution/project it will popup the dialog to warn us. Just click “OK” for it and you can see the “installation progress” in the Output window.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisW_idBYUcFHbVvHcay2-XBUheVLl5aMGgrVV2ByZpvI8j-uudWYl1bZDCvSSgH7MSdcwXdFtUa_I1eF7fl2nElLD3LwEGZY5STHS8hQrlhz_IwLJ_TMpBKTOK6MWoA0wl0kFCpiOih0Ik/s1600/ChangesWindow.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisW_idBYUcFHbVvHcay2-XBUheVLl5aMGgrVV2ByZpvI8j-uudWYl1bZDCvSSgH7MSdcwXdFtUa_I1eF7fl2nElLD3LwEGZY5STHS8hQrlhz_IwLJ_TMpBKTOK6MWoA0wl0kFCpiOih0Ik/s1600/ChangesWindow.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLSZkwrHZoNDKl7vSR3fcHmK0eg9elhW2fUjxc0AO9lb6KIoeHGDgO5wwJjqzy8W8EKdJtnfSF3H1I2HVNh_HjLGaa5FTdtpvKSSrFA3GLvXXbEThCOt-SWA0hsB7YHAHyHeEPje4itxT5/s1600/Installation_Progress_Output_Window.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLSZkwrHZoNDKl7vSR3fcHmK0eg9elhW2fUjxc0AO9lb6KIoeHGDgO5wwJjqzy8W8EKdJtnfSF3H1I2HVNh_HjLGaa5FTdtpvKSSrFA3GLvXXbEThCOt-SWA0hsB7YHAHyHeEPje4itxT5/s1600/Installation_Progress_Output_Window.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;Step 5:&lt;/strong&gt;&lt;br /&gt;
Now you can just expand the “Solution Explore” window, see in the “Reference” to check that particular reference is added or not.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjDgPVsUXJ1QMhSe5rnlfqsvAdFZj8xIvBg04F0uVKvlLLsyJ88nzKjELTiJHdo56IRIQMmEyUGE-F37QpLjDtsQ7IH7sPtRrfqSni1PvWXJaw3x-GbPZLQjqt7FQGnIdj5qwuuKk0-HyS/s1600/Install_Verify.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjDgPVsUXJ1QMhSe5rnlfqsvAdFZj8xIvBg04F0uVKvlLLsyJ88nzKjELTiJHdo56IRIQMmEyUGE-F37QpLjDtsQ7IH7sPtRrfqSni1PvWXJaw3x-GbPZLQjqt7FQGnIdj5qwuuKk0-HyS/s1600/Install_Verify.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Uninstall NuGet Package using ‘Nuget Package Manager’:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Step 1:&lt;/strong&gt;&lt;br /&gt;
If you want to uninstall, again go to the “Nuget Package Manager” and search for the particular package.Visual Studio automatically finds that particular package is installed on not and now you can see the “Uninstall”&amp;nbsp; button.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMTaSsE2oLQo_DsWbrWoYO8MjE5i38HEirAereVXYPZxv7hPeZgZP9KEDvga6mnBjTAH8sm0s2yODw3F8IiAdvzGsicCyLCOnaqKeDUsCjKCWKKlLMmU7eCC0eqmqqW__aZiRSKWF8kybl/s1600/Uninstall.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMTaSsE2oLQo_DsWbrWoYO8MjE5i38HEirAereVXYPZxv7hPeZgZP9KEDvga6mnBjTAH8sm0s2yODw3F8IiAdvzGsicCyLCOnaqKeDUsCjKCWKKlLMmU7eCC0eqmqqW__aZiRSKWF8kybl/s1600/Uninstall.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 2:&lt;/strong&gt;&lt;br /&gt;
Since it made some changes in the project while installing, so it will automatically revert the changes in the file. So again it will popup the dialog. just click “OK”. Also in output window you can see the uninstall status.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXqYsVWwB5xf64yiqSZdHfR-faLeUMPTENQQtCbqZmAt0nYV7lCPrO1fKd2pxwNXLIcKzzaeNd0vshceRGiAXorykDrVBYqGyOp0PjLm2h0jQRbIDuSR5IQo-Mxn8cdeV9f5B5BobbGujO/s1600/Review_Uninstall_Change.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXqYsVWwB5xf64yiqSZdHfR-faLeUMPTENQQtCbqZmAt0nYV7lCPrO1fKd2pxwNXLIcKzzaeNd0vshceRGiAXorykDrVBYqGyOp0PjLm2h0jQRbIDuSR5IQo-Mxn8cdeV9f5B5BobbGujO/s1600/Review_Uninstall_Change.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGPtW2zjBCmxRWFBRy_SGy8Q8169d5PQDBdhNJMGz41yMr5molHI-gdw7t5zQ-8pi1teFoi2xn5Uvkt2uQacs4E2s_Kl8wk2H8CKYgTEjYlrtUKNGVi-Ag82GptzbGTCL7XGCmb9fzD4Cb/s1600/Uninstall_verify.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGPtW2zjBCmxRWFBRy_SGy8Q8169d5PQDBdhNJMGz41yMr5molHI-gdw7t5zQ-8pi1teFoi2xn5Uvkt2uQacs4E2s_Kl8wk2H8CKYgTEjYlrtUKNGVi-Ag82GptzbGTCL7XGCmb9fzD4Cb/s1600/Uninstall_verify.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Install NuGet Package using ‘Package Manager Console’:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
Alternatively, you can use the “Package Manager Console” in Visual studio to install the necessary packages by running the respective command.&lt;br /&gt;
&lt;strong&gt;Step 1: &lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;
Go to &lt;a href=&quot;http://www.nuget.org/&quot;&gt;www.nuget.org&lt;/a&gt; and type the package name in the search box and go to the particular package’s page, there you can find the “Package Manager Console” command.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk2CmWuVEzmn3i_gFmAisjX1rFcL3Py4Q34plpxVgrcARJyqrNcT7rmuy8Epb9Y7mJ6uodxWpiBFphbR75PifcJ-KWBgtcuTJunRXyhJJWlou4cxUs9idmmbnZr7-n2_OSYhjjUsNYw473/s1600/PackgeMgr_command.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk2CmWuVEzmn3i_gFmAisjX1rFcL3Py4Q34plpxVgrcARJyqrNcT7rmuy8Epb9Y7mJ6uodxWpiBFphbR75PifcJ-KWBgtcuTJunRXyhJJWlou4cxUs9idmmbnZr7-n2_OSYhjjUsNYw473/s1600/PackgeMgr_command.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJtJtV5kdX_igMN6ODiNUXbdJbDzjHGKnb7UTSdZSY3vWqX7ayJumPbyMsxaEPao-_P1F5DKsZT_qBiPCSHLXTRgbAmNNzGRhB-_vXWKEXyhxooQzJFh_Av2646iVk8h7pz63jyl57iglD/s1600/seach_package.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJtJtV5kdX_igMN6ODiNUXbdJbDzjHGKnb7UTSdZSY3vWqX7ayJumPbyMsxaEPao-_P1F5DKsZT_qBiPCSHLXTRgbAmNNzGRhB-_vXWKEXyhxooQzJFh_Av2646iVk8h7pz63jyl57iglD/s1600/seach_package.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Step 2:&lt;/strong&gt;&lt;br /&gt;
To open the Package Manager Console, Tools –&amp;gt;NuGet Package Manager –&amp;gt; Package Manager Console.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKc3IA9tDaxR9mAhSRORBc3fG4as8jda1QX3FKqn1CQcaWDEZtG-DN7jzbsdgyWYb2CtjMbRCugwsVNND10QVn7Zf6q2xlqDPTpM38XkCSTQyOVBFU-BThwUDIY8dZNpabhIuQeZOUNfbQ/s1600/Open_PackageMgr.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKc3IA9tDaxR9mAhSRORBc3fG4as8jda1QX3FKqn1CQcaWDEZtG-DN7jzbsdgyWYb2CtjMbRCugwsVNND10QVn7Zf6q2xlqDPTpM38XkCSTQyOVBFU-BThwUDIY8dZNpabhIuQeZOUNfbQ/s1600/Open_PackageMgr.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Just copy the command from above website and paste it on the package manager console and hit enter.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1JMXR3Dj3WyRkCfFIirvkOp0pYyJ6G0NgsYVgPDND1K3SL9Nv07iV45TqPKvY5yhVSn9qB8AgzXESB3QwhH55fkEVE4x8bJamvg5ubatn-l41E4Ve7IvzNFfND0FzYq8GICXRUgAfqrrG/s1600/Install_Nuget_Package2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1JMXR3Dj3WyRkCfFIirvkOp0pYyJ6G0NgsYVgPDND1K3SL9Nv07iV45TqPKvY5yhVSn9qB8AgzXESB3QwhH55fkEVE4x8bJamvg5ubatn-l41E4Ve7IvzNFfND0FzYq8GICXRUgAfqrrG/s1600/Install_Nuget_Package2.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAJHoDI9YMmLAhnlAxkXCTFiC_Jg_lgKDEFNHtxuWTfaKni_n3VKTrikS_hQ7pqSX58JBtEh_o3qNztLrj7Z4JHvKPKop1giiwNPfaLWdv2XTG4_slMqmyF4WHy_5u16fIVQPkqvEbuZ01/s1600/Install_Nuget_Package3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAJHoDI9YMmLAhnlAxkXCTFiC_Jg_lgKDEFNHtxuWTfaKni_n3VKTrikS_hQ7pqSX58JBtEh_o3qNztLrj7Z4JHvKPKop1giiwNPfaLWdv2XTG4_slMqmyF4WHy_5u16fIVQPkqvEbuZ01/s1600/Install_Nuget_Package3.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;Note :&lt;/strong&gt;&amp;nbsp; Before hit enter key, just check the project name in the “Default project” dropdown. Incase, if you have lot of projects, you must pay attention on this by selecting correct project.&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Uninstall NuGet Package using ‘Package Manager Console’:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
Step 1: &lt;br /&gt;
In order to uninstall, just type the below command in the “Package Manager Console” and hit enter, it will uninstall the package: &lt;em&gt;Uninstall-Package routedebugger. &lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9a17jko5cddbWJloUjbHNFr_zD6jaD4QrPSrZ0pkMmYYUZxkZc1htu-UPdv3ojUbkDQJAqn1kjBK_ckVMqKAyoOUHgPeFbvd27t3NapFqTu-Blx_6Zywke242leM6cn45JHw9mLAhaORL/s1600/Uninstall2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9a17jko5cddbWJloUjbHNFr_zD6jaD4QrPSrZ0pkMmYYUZxkZc1htu-UPdv3ojUbkDQJAqn1kjBK_ckVMqKAyoOUHgPeFbvd27t3NapFqTu-Blx_6Zywke242leM6cn45JHw9mLAhaORL/s1600/Uninstall2.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
That’s all! Hope this will helpful for someone!! Let me know your thoughts as comments!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/8754388464541271713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/10/visual-studio-how-to-install-nuget.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/8754388464541271713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/8754388464541271713'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/10/visual-studio-how-to-install-nuget.html' title='Visual Studio : How to install Nuget packages in your project?'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU9bmRctQlysT6A7VoHmLv-QCQgYygtT2JsrgAjCVK9DdTq7ChyphenhyphentRiqqMU08jDcOruAe-NNox19sczHlfPEO0VAiS_p9X3Pt0wTXg1CpyLAewSuVNY7q8NwzfVoW3zMg3ZrHQOlaiLpwvb/s72-c/SolutionExplorerMenu.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-1810720784222605956</id><published>2015-09-20T18:07:00.000-07:00</published><updated>2016-05-11T16:43:52.959-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net Server Controls"/><title type='text'>Various ways to Inject JS into ASP.Net Controls</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
There are various ways to inject Javascript to the ASP.Net Controls. In this post we are going to discuss those techniques.&lt;br /&gt;
&lt;br /&gt;
For simple illustrative purpose, normally in an ASP.Net Webform, in the controls like Text box, whenever you press enter key it will submit the page. In other words, it will posted the page back to the server. In this post, we are going to see how to avoid this by using Javascript. &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Technique 1: Inject Javascript directly to the markup. &lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In this way, you need to include the “onkeydown” event on each text box control.&lt;br /&gt;
&lt;strong&gt;Markup:&lt;/strong&gt;&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt; 
&amp;lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeBehind=&quot;WebForm1.aspx.cs&quot; Inherits=&quot;DemoWebForm.WebForm1&quot; %&amp;gt;  
  
&amp;lt;!DOCTYPE html&amp;gt;  
  
&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;  
&amp;lt;head runat=&quot;server&quot;&amp;gt;  
    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;  
&amp;lt;/head&amp;gt;  
&amp;lt;body&amp;gt;  
    &amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;  
        Enter First Name:   
         &amp;lt;asp:TextBox ID=&quot;TextBox1&quot; runat=&quot;server&quot; AutoPostBack=&quot;false&quot; onkeydown=&quot;return (event.keyCode!=13);&quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;  
        &amp;lt;br /&amp;gt;  
        Enter Last Name:   
         &amp;lt;asp:TextBox ID=&quot;TextBox2&quot; runat=&quot;server&quot; AutoPostBack=&quot;false&quot; onkeydown=&quot;return (event.keyCode!=13);&quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;  
        &amp;lt;br /&amp;gt;  
  
        &amp;lt;asp:Button runat=&quot;server&quot; ID=&quot;btnSubmit&quot; Text=&quot;Submit&quot; /&amp;gt;  
    &amp;lt;/form&amp;gt;  
&amp;lt;/body&amp;gt;  
&amp;lt;/html&amp;gt; 
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Technique 2: Inject Javascript thru server side code.&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If you want to achieve the above one in server side, that is you loop thru the controls and inject the same javascript snippet. For this, you can use the following markup and code behind:&lt;br /&gt;
&lt;strong&gt;Markup:&lt;/strong&gt;&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;&amp;lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeBehind=&quot;WebForm1.aspx.cs&quot; Inherits=&quot;DemoWebForm.WebForm1&quot; %&amp;gt;  
  
&amp;lt;!DOCTYPE html&amp;gt;  
  
&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;  
&amp;lt;head runat=&quot;server&quot;&amp;gt;  
    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;  
&amp;lt;/head&amp;gt;  
&amp;lt;body&amp;gt;  
    &amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;  
        Enter First Name:   
         &amp;lt;asp:TextBox ID=&quot;TextBox1&quot; runat=&quot;server&quot; AutoPostBack=&quot;false&quot; &amp;gt;&amp;lt;/asp:TextBox&amp;gt;  
        &amp;lt;br /&amp;gt;  
        Enter Last Name:   
         &amp;lt;asp:TextBox ID=&quot;TextBox2&quot; runat=&quot;server&quot; AutoPostBack=&quot;false&quot; &amp;gt;&amp;lt;/asp:TextBox&amp;gt;  
        &amp;lt;br /&amp;gt;  
  
        &amp;lt;asp:Button runat=&quot;server&quot; ID=&quot;btnSubmit&quot; Text=&quot;Submit&quot; /&amp;gt;  
    &amp;lt;/form&amp;gt;  
&amp;lt;/body&amp;gt;  
&amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Codebehind:&lt;/strong&gt;&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
  
namespace DemoWebForm  
{  
    public partial class WebForm1 : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            DisableEnterKey(Page.Controls);  
  
        }  
  
        public void DisableEnterKey(ControlCollection ctrls)  
        {  
            foreach (Control c in ctrls)  
            {  
                foreach (Control ctrl in c.Controls)  
                {  
                    if (ctrl is TextBox)  
                        ((TextBox)ctrl).Attributes.Add(&quot;onkeydown&quot;, &quot;return (event.keyCode!=13);&quot;);  
                    else if (ctrl is DropDownList)  
                        ((DropDownList)ctrl).Attributes.Add(&quot;onkeydown&quot;, &quot;return (event.keyCode!=13);&quot;);  
                }              
            }  
        }  
    }  
}  &lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Technique 3: Using JQuery&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In the above 2 techniques, either we need to include the same line in each controls or we need to loop thru the controls and inject the JS. In some cases you may want to achieve the same using the JQuery&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Markup:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;&amp;lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeBehind=&quot;WebForm1.aspx.cs&quot; Inherits=&quot;DemoWebForm.WebForm1&quot; %&amp;gt;

&amp;lt;!DOCTYPE html&amp;gt;

&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;
&amp;lt;head runat=&quot;server&quot;&amp;gt;
    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
    &amp;lt;script src=&quot;Scripts/jquery-1.10.2.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
        $(document).ready(function(){ 
            $(&#39;input[type=text]&#39;).on(&quot;keydown&quot;, &quot;&quot;, function () { return (event.keyCode != 13); });
        });
    &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;
        Enter First Name: 
         &amp;lt;asp:TextBox ID=&quot;TextBox1&quot; runat=&quot;server&quot; AutoPostBack=&quot;false&quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
        &amp;lt;br /&amp;gt;
        Enter Last Name: 
         &amp;lt;asp:TextBox ID=&quot;TextBox2&quot; runat=&quot;server&quot; AutoPostBack=&quot;false&quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
        &amp;lt;br /&amp;gt;
        &amp;lt;asp:Button runat=&quot;server&quot; ID=&quot;btnSubmit&quot; Text=&quot;Submit&quot; /&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

&lt;/pre&gt;
&lt;br /&gt;
The above one is so simple, that is no repetition of code. &lt;br /&gt;
&lt;br /&gt;
Hope this helps!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/1810720784222605956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/09/various-ways-to-inject-js-into-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/1810720784222605956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/1810720784222605956'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/09/various-ways-to-inject-js-into-aspnet.html' title='Various ways to Inject JS into ASP.Net Controls'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-3026049161913609777</id><published>2015-09-14T21:22:00.001-07:00</published><updated>2015-09-17T06:32:27.743-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net"/><category scheme="http://www.blogger.com/atom/ns#" term="Webpage"/><title type='text'>How to improve the performance of an ASP.Net Web page?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBItLLXOkK_FJkjW1OANx0ss2PJEwiYFiISsPn1Ov2qHXmymPdaUH8_vyqfzckPT6c10FZW-DlG2f3KRtqScuAu2ioI1adr6qM71X1HUuhxEPjs89RGRWCICB9ZPqB27GQieFQGkwx_QfE/s1600-h/Performance%25255B3%25255D.jpg&quot;&gt;&lt;img alt=&quot;Performance&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhranoR2DKC5K3j3ShaGViQy6XD4hQyt_-qHqJ5FZN0NGD3IKD-XJQmOAylyK7K1svmGYPdrAgzH6_3_4bunbefsLY2Bk_DCSF3tg_roNoanceZTcIEXQfAdt40yl28i5JIy50tzlmHhIcA/?imgmax=800&quot; height=&quot;355&quot; style=&quot;background-image: none; border: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Performance&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This is the most common question from asp.net forum to any interview. In this post I’m going to point out some of the important points that may help to improve the performance. &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; Here I used the word “improve performance” in the sense to decrease the loading time of the page. There are various reason behind. Some of them we look into from the “backend side” (Database side) and rest of them we need to take care in “front-end” ((UI) side.&lt;br /&gt;
For illustrative purpose, you have a ASP.Net Web site, one of the aspx page take much time to load. Also as a backend I assume that you are using SQL Server. Through out this article, we are going to see how to decrease the loading time.&lt;br /&gt;
&lt;strong&gt;Back End (DB):&lt;/strong&gt;&lt;br /&gt;
Below are the points that you need to consider to fine tune the DB:&lt;br /&gt;
1) Try to check the Query performance, that is how much time the query will take to execute and pull the records from DB. The Use SQL Server Profiler and Execution plan for that query. So that you can come to the conclusion in which part it took much time.&lt;br /&gt;
2) Check in every table (who are all part of the query) Index is created properly.&lt;br /&gt;
3) If your query involves an complex Stored procedure, which in turn use lot of joins, then you should focus on every table. In some cases, sub-query perform better than the joins.&lt;br /&gt;
4) If your web page, involves paging concepts, try to move the paging concepts to SQL Server. I meant that based on the page count the SP will return the records, instead of bring the records as a whole.&lt;br /&gt;
&lt;strong&gt;Front End (UI):&lt;/strong&gt;&lt;br /&gt;
1) If your page displays a lot of records, try to introduce “paging”. Say for example your page displays 1000 record in a page. Instead of pulling 1000 records as a whole, by introducing paging such that page size as 10, you need to pull 10 records only! &lt;br /&gt;
2) Try to choose “tabless” design, that is try to avoid “table” to design the webpage. In order to achieve this use should use “div” tag. &lt;br /&gt;
3) If you want to design responsive pages, try to use existing (proved) frameworks such as Bootstrap, instead of trying your own code.&lt;br /&gt;
4) Also if your webpage deals with lot of images or videos to display, then consider to use appropriate CDN (Content Delivery Network).&lt;br /&gt;
5) Use bundling and minification techniques, which reduce the server calls to load the javascript and CSS files, which in turn reduce the loading time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Readers!! Do you thing that I have missed out anything? Let me know your thoughts in comments! &lt;img alt=&quot;Smile&quot; class=&quot;wlEmoticon wlEmoticon-smile&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR2w9Xr6m0rSDJ9cl2zGAuPXiGee3WA03Zm6pWcQv4XVIATk0avupw1fhIalvXWqtBDrQrGapaS9qY6QsB3joiIGaBxj1mkAfQGXP1A0WAxBnx5yNgaImmsvhoiRYt8m6OtUJgfHNGGW6k/?imgmax=800&quot; style=&quot;border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;&quot; /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/3026049161913609777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/09/how-to-improve-performance-of-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/3026049161913609777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/3026049161913609777'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/09/how-to-improve-performance-of-aspnet.html' title='How to improve the performance of an ASP.Net Web page?'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhranoR2DKC5K3j3ShaGViQy6XD4hQyt_-qHqJ5FZN0NGD3IKD-XJQmOAylyK7K1svmGYPdrAgzH6_3_4bunbefsLY2Bk_DCSF3tg_roNoanceZTcIEXQfAdt40yl28i5JIy50tzlmHhIcA/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-9075188756042574556</id><published>2015-09-09T18:52:00.000-07:00</published><updated>2015-09-10T18:56:25.589-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>How to publish ASP.Net Web application using Visual Studio 2015</title><content type='html'>&lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; In this post, we are going to see a step by step procedure using the custom profile option. In other words, this post is going to explain how to publish the website in local file system.&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; The main purpose of publish dialog is provide an simplified way to take the file list which need to be publish on your website. In this article I’m going to explain how to publish a MVC web application using the “publish” dialog provided in VS 2015.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;strong&gt;Step 1 : Open Publish Dialog&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; You can open the publish dialog by “Right Click” on the project then select “Publish” on the floating menu.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn3YBcbDSMBpElxMa3p7sZ2_b-cH03ENgGut7IK91-q-SvQH5mbXmJpygZ5wCbpjSSbv8QH871KzczVg-EiGGIDZCirGGIajNtWKIsv0M75_d7amAcS2RnjCPlslAWLuFTNtCznJqYIbi4/s1600-h/PublishCommand2.png&quot;&gt;&lt;img title=&quot;PublishCommand&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;PublishCommand&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4EzMagwFrNEFIgTzmwUgmY_0Oa77XFJi-fqgdqwOo1Ca9xlNGIrXJPHvoagWq5XJdgnvQvKGE9K3O3K8xGWLME06q5ldw9cwPBshedcyhfmG6Bmh5q0uJ6lZI6mFMYTxPkYc7GMvduC7k/?imgmax=800&quot; width=&quot;244&quot; height=&quot;108&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 2: Create Profile&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; As a first step, you should create a profile before publishing. This is just one kind of grouping, say for example you can create multiple profile one for Azure and one for local. So when next time you open this dialog you can see the profiles and select from them.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbj_AMXLghxgem29WswzLJPITsZgqk3kRu5-AmxO6yfd5pp2BS5wD0Ur-YaCtI30Dak5HfF8aerHUiEskTa2Ws9GK7_isbB84b4ZnFNDGSre-fVv-QTZsuhjmNMfDLEFmLGtUq8glQJKSw/s1600-h/PublishDialog5.png&quot;&gt;&lt;img title=&quot;PublishDialog&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;PublishDialog&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBw6x591z9QH5Ug-hQm8-KxDoxJYrby66sIzqltgAYTZfCB56hFienPR99wyCsvBAv2bgFSR0_JX8up_EZI34E7hMyP69zFCtPzGkzgNu6SdLsbTwcJjASPY6e2NpjLgEgo6kURX2Odu7A/?imgmax=800&quot; width=&quot;244&quot; height=&quot;192&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I have selected “Custom” as a “Publish Target” and gave profile name as “LocalPublish”.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEq39bSNtUl7hlvYHDAW6Cc6N9GQls3Td_ONTgoefDOu85-2KDnAygXFXnPltVBmuKFmc2F7UxG9bC_JHDfiKugG0TiVeVtmJS-JxvaUbYyBkSf8i7krKqP-gfj31x-qEa5c10NlVYmM0N/s1600-h/PublishProfileDialog2.png&quot;&gt;&lt;img title=&quot;PublishProfileDialog&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;PublishProfileDialog&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJzcfVdXpBTHkUwG8dYwVHy0ABkNqDNc91uDtWbaQ3EiguDE7GTLipT6El4Mc01Uv-aSkEesusNZWO0S5z480E13Cj1SSnTwGWQYzjuVSwW55VBFnbR1rQdqcpUOUUfVoF3od0ixn5n7Vf/?imgmax=800&quot; width=&quot;244&quot; height=&quot;194&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 3: Select the Connection&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In this step, we need to tell where our published files are going to be. You can publish the files directly on your server also by selecting “Web Deploy” publish method or you can use FTP too.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinEbRQTSP0cK4onhmo15piiRBU2vNTpPGkpS5beGW34ANY8iGoBgNXvnwwstjf74PYsWD5F6LaouLH6oKhjndMlaK5liiZi_9OkIvi8WnLREjPhAxDGy68KrLSFZ1ir9cYhxpNbQdjEeuk/s1600-h/PublishOptions2.png&quot;&gt;&lt;img title=&quot;PublishOptions&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;PublishOptions&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZSr_UKDl8W8XzWvuc0hTAgeLSs4dxuHXf16bDX3FERVzgZXiaHCPT5VJM65o3_lXxgJ6IE70ItLo1Vt5g0KiuPKinEzU63Yy0Ju5-O9vShGrUsQBRVY7Aug_JhPiOA03zOCmPVLmPZ4zJ/?imgmax=800&quot; width=&quot;244&quot; height=&quot;188&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Since I’m going to publish files in local file system so I selected “File System”.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdJa20T2sn8s_eGrZOPrr944xrF10IP9COlRVhv3tYBQm-cPtv3Aw0vyf8XC71OuifQwRJbQGw7xNeChkHtN5Y1_BXHUh9Xy78Ln7ruoghvKIVTiuzd_ekzzdj7J2t7IKjggcTiCNbUJob/s1600-h/PublishInLocal2.png&quot;&gt;&lt;img title=&quot;PublishInLocal&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;PublishInLocal&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidOhPf66Psai4Y20cBrJA6YxkymApx1_5BaXvZbyCl5CcyJ-gSZYkppHc-KMY4C37frJDp61LEaq2bsH91OnQVy2K4mn0xpQZt3JfMYeD9onYDcjJCzelSgW7_5TjRRTk6Mfirp24lPspD/?imgmax=800&quot; width=&quot;244&quot; height=&quot;191&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 4: Select Configuration and other settings&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In this step, you can choose “Configuration” mode and other settings like delete files before publishing in the specific folder, precompile etc.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnKEYq1B0_FQuJpUjS6fEOwCw5sD6O2gNIkEo2IK7yk91HhX5lx07B5-DrQiJG0JtKDc8U3NzDUKmiOSbLjWOSZnEchUgMI2uugB2VZnbN6TiFoCjc8ebNm8WdkA2l8Q8GRRZ1_1mXoegZ/s1600-h/PublishMode2.png&quot;&gt;&lt;img title=&quot;PublishMode&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;PublishMode&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAlnxS9bzzGFLWlXWlGJ0XQ37Xe8O2i49NZVYECi1_rW4NoImeQHGjFSmIHhe2Ihu5O6r_6wevCYh3PcrTg3iM8tjZfHKwotyMsItuIoLoL5eJGWpFCF9RDZRg49cHah8mvsUs4kybSuTV/?imgmax=800&quot; width=&quot;244&quot; height=&quot;193&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 5: Preview &amp;amp; Publish&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You are about to complete your publishing. Click publish to start the publishing.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7_6SaTqPCCrgagCoWCz9WScK7PLaydLu9iflOqAz4VKIB7jPyV92nZt6G9fQTIJAOS7XJkH4Bch6zprNQ6G7IvSA2c57YRncfbUfR5vx52QyRp7eYMIdyRlKBwl2DwBpzMP6K5DPAcKTe/s1600-h/PublishPreview2.png&quot;&gt;&lt;img title=&quot;PublishPreview&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;PublishPreview&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji_21WVt68y5rZAGhj2lib3h8X5wL9klbOI1eHScPuPbMKasM1gR6WKuNH3UvbAm4obGbotNmBh8T0CUZ4IyIPA5ve6ODabjsjV1MxmmQ1ad9E9pGytlnGMIzFrIufi2AKXEVQSts-woWt/?imgmax=800&quot; width=&quot;244&quot; height=&quot;192&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the output window you can see the result of the publish.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc_5ybDwtNUdVKDvhNwjSf_fQSJznYKPjQhlqAw-D9mihoiSonW3AfV1H2HTIbbDZ4kcHBgo5VGYdRPOzxJCHxitdQapAOJjezbl4juDbCQGBIrTyBQNG7MTzt87WFZ7mGZ1xh_I6zHS1O/s1600-h/OutputWindowAck2.png&quot;&gt;&lt;img title=&quot;OutputWindowAck&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;OutputWindowAck&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDybyZaw3eCWCYkgWEZ_97NaPAe5In3ckU2tvlvAx1KyX2W0_VTx20xMkz7M6IjFSKFkn6aam_9A13y396Jdj2EGYieog4Z5HdaPU_qOM2PDHQCzpbxzwNttC-52d1tpOZWs7yAq0XPtZ3/?imgmax=800&quot; width=&quot;244&quot; height=&quot;104&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Hope this post is useful who are all using the “Publish” option in Visual Studio 2015. &lt;/p&gt;  &lt;p&gt;Happy Coding!!&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/9075188756042574556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/09/how-to-publish-aspnet-web-application.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/9075188756042574556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/9075188756042574556'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/09/how-to-publish-aspnet-web-application.html' title='How to publish ASP.Net Web application using Visual Studio 2015'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4EzMagwFrNEFIgTzmwUgmY_0Oa77XFJi-fqgdqwOo1Ca9xlNGIrXJPHvoagWq5XJdgnvQvKGE9K3O3K8xGWLME06q5ldw9cwPBshedcyhfmG6Bmh5q0uJ6lZI6mFMYTxPkYc7GMvduC7k/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-47880450265271097</id><published>2015-09-07T14:32:00.001-07:00</published><updated>2015-09-07T14:32:36.410-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="IIS"/><title type='text'>How to Hosting Asp.net MVC Web Application in Local Machine?</title><content type='html'>&lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; In this post I’m going to discuss about how to host an ASP.Net MVC Application in your&amp;#160; local machine. Most of the steps to deploy a web form application and MVC applications are equivalent. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Prerequisite:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; In order to explain the steps, I assume you have a complete ASP.Net MVC Application that is ready to build with out any error.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Publish you MVC application in a local file path, using publish option in Visual Studio. &lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXSHAcSBfpOpwrthnPA-uFkhGE9iW4PiKPZTOVTP8ADfxqzp02hkTWDdAgWuxJamw0UixWVjMlt_u7OCelGgiFe6LtZcJ0bESTL3C5bQVJCFVhhwdK4ABZGajIDeAqEp_6G_XJzradL4rL/s1600-h/publishOptionInVS%25255B2%25255D.png&quot;&gt;&lt;img title=&quot;publishOptionInVS&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;publishOptionInVS&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsNnvY31gZiyqHC6Bca-of5Gxec07fLwU84QGb9pRYXsi63Vvhlk6cQZ1rAPO0o9VBy4IDDwK7feAztpDlhN_LNcJEwiD85jNzQxsYZttP-KbvW3nPo4tWUmEWPHuxOUA2ds3p6PW80XPq/?imgmax=800&quot; width=&quot;244&quot; height=&quot;117&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For this example, I have published my application in the below path like : C:\MVCDemo&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7t0QFG2axFr4iYBQkYEK0DBp1LICwkMSDZ1MwpsoHQmFKzB3y6z4jk6H9c-dBRdekTQT-e-PO_J5lSCkaDxnhicF-dNJTmIJY9fjfpvoODSaeVD4TIUeyNHDlH5hBQP9dGOkNyeA9UUp4/s1600-h/ASPNETPublishedFiles%25255B2%25255D.png&quot;&gt;&lt;img title=&quot;ASPNETPublishedFiles&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;ASPNETPublishedFiles&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9aJtbQN7hhVF7tSlEPVopdPV892vp6eSRA6mQ-h8MC1CbS3AHajjW6X5FrZZxGf-BWJxJmxgk58lmS7cprnKoNVnCimhwRasiesYLNJwCTkQpZPMnVr6tuxCT4TRrNrJzFRPob57S0RPO/?imgmax=800&quot; width=&quot;244&quot; height=&quot;131&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Create a Virtual directory in IIS and mapped the above published file path to it. &lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL7krzvq4KN_iTNHhbl-RAAEI1lTOmn-Dl9sXFTn6CsvXvgAfPk0mJQLw-JYZGIn6imKTg5vFrjORYiQ7AtLRWyp-s2euM7EV7vxFCgHSSPO2vjMONNjZT-GhQQ13g8K0Q5mIGryjkb0NH/s1600-h/MVCAppVirtualDirectory%25255B2%25255D.png&quot;&gt;&lt;img title=&quot;MVCAppVirtualDirectory&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;MVCAppVirtualDirectory&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZd845Vl6kuUUxmIY_27-N1vOH7c4mXm1Daxa3kSyA5_HmAei6t3jUbzUZnnBhGaWsjYrFAbFOhEUNAWoa4nzmZaMMnbANhN6ssYDswr9BHysk5xOk6kBXMkmUGmlcYSwQMLtdIdozITB0/?imgmax=800&quot; width=&quot;212&quot; height=&quot;204&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you have any doubts in creating virtual directory refer my below blog posts:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://www.aspdotnetchamp.com/2013/08/visual-studio-tips-tricks-2-create.html&quot; target=&quot;_blank&quot;&gt;Create virtual directory on IIS using Visual Studio.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://www.aspdotnetchamp.com/2013/09/create-virtual-directory-in-iis_24.html&quot; target=&quot;_blank&quot;&gt;Create Virtual directory on IIS&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You are almost done! The only thing pending is you need to browse the website, that just published. This is where most of the ASP.Net developer (especially who is a newbie to ASP.Net MVC), what they were doing : Expand the Virtual directory –&amp;gt; Views –&amp;gt; Switch to content view –&amp;gt; select the cshtml file –&amp;gt; right click on it and click “Browse”, which throws 404 Error in browser.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTmyvdXWZ44qFn5pONHVl1J0J3p8dJZwU5D96tm9qN9U4uUzx0snMKgUYQv4RMzclaD52GsQAVCQ5x8xL8Oqz35Kg71ZLIzd70_F0NJ_yD63UYZI24pHSGL8ljVAKveJLl0DlHJ-wwVJzt/s1600-h/BrowseMVCFile%25255B2%25255D.png&quot;&gt;&lt;img title=&quot;BrowseMVCFile&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;BrowseMVCFile&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4MavEdEkmNecT_vUQLlDj7Ouh5MU9Mv5SMTkt3E9VrgSb6G5V4nJEBu6JOYNdwWbEwRPTKHk0DeSsUHXOP3rVLO747f3DVWrllr9vZMgSxrDOvjG4SLz6PTdd2fKug0_XsMoX2mTyHJ7s/?imgmax=800&quot; width=&quot;244&quot; height=&quot;127&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpZc7wtywERT2oooWDy7oOihBRnUcaCyJwVJhW5TfFT4fxZvLV_uqBkFWx7L7f2gSxuBFDCQQSci1OkVFW9d1zINHbGjS8cZZkW18LdNnNzmH9hINAJn7uy3_Rk4rRonUZUN3mslKTJOaR/s1600-h/404Error%25255B2%25255D.png&quot;&gt;&lt;img title=&quot;404Error&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;404Error&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjYY-DG0WF070Ngf2rnUj2wVznhioq9LjmEYF6rDvJNCwTkTTWAA8pJ_6GdgDA9fK9yXixW1YvL3uHvawyiMu9HuG8DihJ4993FWzTvM-i-xXkTsHWy_AZgxdTAzcXsZYVurXKj8beF5A7/?imgmax=800&quot; width=&quot;244&quot; height=&quot;51&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The above issue is common to all ASP.Net developers, who are all comes with ASP.Net&amp;#160; WebForm background. In order to browse the&amp;#160; mvc application, you need to mention the path in the form like “http://localhost/YourControllerName/YourActionMethod&amp;quot;, which is the url routing pattern specified by default.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEH_M0pt34LQKTV_VKyQQ3uHss0EQPlaBuL7qKra5ptJokR3JqtmXok8S8yiCm6Y-1Drm3ej3LfrjacltotpBZmPKf4s_ddrOGsdFnYNdpglxKQPKmIpXQlV6fOgY65LiDRle7H2CCAijc/s1600-h/ASPNetApplication%25255B2%25255D.png&quot;&gt;&lt;img title=&quot;ASPNetApplication&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;ASPNetApplication&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSuk8sQq48DP-ExFU_0Zat4Vnbt-dhPzoCy9_ydsA6-iyfiD4wIgtBF3xKZzREYC7JOGG6M5GBjmPEG1Sj1AAVgTeFUf_v67wdDdWcMnP2L2J76RTES6KO8ZRf34jrTVRP66pAcRFpF1j7/?imgmax=800&quot; width=&quot;244&quot; height=&quot;68&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Hope this helps!&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/47880450265271097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/09/how-to-hosting-aspnet-mvc-web.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/47880450265271097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/47880450265271097'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/09/how-to-hosting-aspnet-mvc-web.html' title='How to Hosting Asp.net MVC Web Application in Local Machine?'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsNnvY31gZiyqHC6Bca-of5Gxec07fLwU84QGb9pRYXsi63Vvhlk6cQZ1rAPO0o9VBy4IDDwK7feAztpDlhN_LNcJEwiD85jNzQxsYZttP-KbvW3nPo4tWUmEWPHuxOUA2ds3p6PW80XPq/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-2353726454301859175</id><published>2015-09-03T05:26:00.001-07:00</published><updated>2015-09-03T05:29:05.466-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C# Interview Questions"/><title type='text'>Daily Interview Questions #15 : What is the difference between the C# keywords ‘ref’ and ‘out’?</title><content type='html'>&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; width=&quot;400&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;         &lt;p align=&quot;center&quot;&gt;&lt;strong&gt;ref&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;         &lt;p align=&quot;center&quot;&gt;&lt;strong&gt;out&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;Parameters passed with the prefix “ref”. By using “ref” C# implements the concept called “Call by reference”.&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;Parameters passed with the prefix “out”.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;An argument passed by ref must be assigned with a value before the call.&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;‘out’ parameter must assigned with some value prior to the termination of the function.&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  </content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/2353726454301859175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/09/daily-interview-questions-15-what-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/2353726454301859175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/2353726454301859175'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/09/daily-interview-questions-15-what-is.html' title='Daily Interview Questions #15 : What is the difference between the C# keywords ‘ref’ and ‘out’?'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7836685776546151247.post-3942464019115049304</id><published>2015-08-18T19:14:00.001-07:00</published><updated>2016-05-11T16:56:54.336-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SMS Gateways"/><title type='text'>How to Send SMS From ASP.Net Web Application?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;strong&gt;Disclaimer:&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In this article I have used a Third party SMS Gateway service provider, which is I have personally used and experienced. &lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Introduction:&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In my previous article I explained &lt;a href=&quot;http://www.aspdotnetchamp.com/2013/11/learn-by-experience-sms-gateways.html&quot;&gt;SMS Gateways and the various schemes&lt;/a&gt; available for them. This article explains how to integrate those SMS gateways into an ASP.Net web application. &lt;br /&gt;
&lt;strong&gt;What a &quot;SMS Gateway&quot; is?&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A SMS Gateway allows a computer to send or receive SMS to or from a telecommunications network. This &lt;a href=&quot;http://en.wikipedia.org/wiki/SMS_gateway&quot;&gt;Wikipedia URL&lt;/a&gt; provides more detail.&lt;br /&gt;
&lt;strong&gt;Some “facts” about SMS Gateways&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; When I did some experimentation and Googling of SMS gateways some of the tutorials suggested use of “free” SMS gateways. But nothing worked for me. Latter I understood that “Nothing comes free”. Also most people asked the same question: “Is there any free SMS service is available to send SMS from my website?”. In my experience the answer is &lt;strong&gt;no&lt;/strong&gt;. So my point here is, don’t waste your time searching for the free API. Instead, find a well-suited SMS Gateway provider and sign up with them. &lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;strong&gt;What’s next?&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Well you want to send a SMS from your ASP.Net web application. So as a first step, you need to sign up with a SMS Gateway provider to get the SMS credits. Normally all SMS gateway providers provide at least 10 free SMS credits to check their services. Also they will provide details of the Application Programming Interfaces (APIs) and explain in detail how to integrate those API codes into your application. &lt;br /&gt;
For demo purposes I have signed up an account with mvaayoo SMS gateway providers and will use their services in this tutorial. &lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Markup&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For the simple illustrative purposes, I’m going to develop a simple UI in a web-form as in the following. I have a textbox to accept mobile numbers and a button to send the message. That’s all!&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; stype=&quot;text-align:left;&quot;&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;    
   &amp;lt;head runat=&quot;server&quot;&amp;gt;    
      &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;    
   &amp;lt;/head&amp;gt;    
   &amp;lt;body&amp;gt;    
      &amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;    
         &amp;lt;div&amp;gt;    
            &amp;lt;asp:Label runat=&quot;server&quot; Text=&quot;Enter Mobile Number&quot;&amp;gt;&amp;lt;/asp:Label&amp;gt;    
            &amp;lt;asp:TextBox runat=&quot;server&quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;    
            &amp;lt;br /&amp;gt;    
            &amp;lt;asp:Button runat=&quot;server&quot; ID=&quot;btnSent&quot; Text=&quot;Sent SMS&quot; OnClick=&quot;btnSent_Click&quot;&amp;gt;&amp;lt;/asp:Button&amp;gt;    
         &amp;lt;/div&amp;gt;    
      &amp;lt;/form&amp;gt;    
   &amp;lt;/body&amp;gt;    
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;strong&gt;Code behind&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In the code behind file, we need to copy and paste the API code provided by the SMS Gateway. As I already explained, every SMS Gateway service provider provides the API code to be used in your application. In mvaayoo, they provide the API code for ASP.Net, ASP, VB and PHP too. You need to substitute the user name password and sender id in the respective places in the URL. You need to also specify the mobile number too in the URL. If you want to send the SMS to multiple numbers then you need to provide those numbers in comma-separated format.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot; style=&quot;text-align: left;&quot;&gt;protected void btnSent_Click(object sender, EventArgs e)  
{  
     // use the API URL here  
     string strUrl = &quot;http://api.mVaayoo.com/mvaayooapi/MessageCompose?user=YourUserName:YourPassword&amp;amp;senderID=YourSenderID&amp;amp;    receipientno=1234567890&amp;amp;msgtxt=This is a test from mVaayoo API&amp;amp;state=4&quot;;  
     // Create a request object  
     WebRequest request = HttpWebRequest.Create(strUrl);  
     // Get the response back  
     HttpWebResponse response = (HttpWebResponse)request.GetResponse();  
     Stream s = (Stream)response.GetResponseStream();  
     StreamReader readStream = new StreamReader(s);  
     string dataString = readStream.ReadToEnd();  
     response.Close();  
     s.Close();  
     readStream.Close();  
}
&lt;/pre&gt;
That’s all! You have successfully created an application to send SMS messages.&lt;br /&gt;
Happy coding!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aspdotnetchamp.blogspot.com/feeds/3942464019115049304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/08/how-to-send-sms-from-aspnet-web.html#comment-form' title='20 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/3942464019115049304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7836685776546151247/posts/default/3942464019115049304'/><link rel='alternate' type='text/html' href='http://aspdotnetchamp.blogspot.com/2015/08/how-to-send-sms-from-aspnet-web.html' title='How to Send SMS From ASP.Net Web Application?'/><author><name>Francis</name><uri>http://www.blogger.com/profile/08941330350310076290</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>20</thr:total></entry></feed>