Tarun Dudhatra, Author at Coding Sharp

Author: Tarun Dudhatra

Interview Questions and Answers for ASP.NET MVC

Interview Questions and Answers for ASP.NET MVC

Asp.Net MVC, C# Interview
Nova days ASP.NET MVC is getting more and more popular. ASP.NET MVC has a very good feature called Modal-View-Controller architecture so it is more popular. In this article we will see the some Question and Answer for ASP.NET MVC which will help you to make your asp.net mvc concept clear in short time. We will keep posting more and more article in this interview series so this will be your unique place to find interview related questions answer. Now let's start some important interview question answer related to ASP.NET MVC. 1. What is ASP.NET MVC ? Most commonly asked question in the interview, ASP.NET MVC is an architectural pattern which separates the UI and code. Mainly it's divided into 3 Parts Model, View and Controller. -Model : Model is a real word object, (Database table) ...
Process with an ID #### is not running in visual studio community edition 2015

Process with an ID #### is not running in visual studio community edition 2015

Asp.Net, Asp.Net MVC, C#.Net
Today I was working on a project and my team member has push the changes to repository first time and I get the latest from git. When I tried to run the project I get an error like "Process with an ID #### is not running". It's showing Id number different every time. If I check the error window It showing me an error like below "The program '[3148] iisexpress.exe' has exited with code -1073741816 (0xc0000008) 'An invalid handle was specified'." In browser it's shows me message like "The webpage is not available." I have tried different different solutions and check but non of them fixed my issue. After googling I found some different different solution and finally 1 solution worked for me. So let me show you how to resolve that issues in visual studio. Solution 1. Cl...
ASP.NET Web API

ASP.NET Web API

Asp.Net, Asp.Net MVC, C#.Net
Asp.Net Web API is a framework for building HTTP services that can be consumed by a broad range of clients including web browsers, mobile phones and tablets. Actually Web API is not a part of Asp.net MVC Framework, however it is very similar to Asp.Net MVC Framework, It provides similar feature like controller, action results, routing, model binders, filters, dependency injection or Inversion of Control container. It is a part of standard Asp.Net Framework so it can be used with Asp.Net Web Forms as well as Asp.Net MVC. It can be used as a stand alone application like web services. Asp.Net Web API is a very good platform to build a RESTful application. Nova days web application is not capable to reach more customers, as people using smart phones and tablets in their daily routine life f...
Difference between WCF and Web API

Difference between WCF and Web API

Asp.Net, Asp.Net MVC, C#.Net, Difference
Difference between WCF and Web API WCF Web API WCF ships with .NET Framework only Web API ships with .NET framework as well as open source WCF Supports RESTful services but in limited manner Web API is very ideal to build RESTful services WCF use attribute based programming model Web API maps http verbs to methods WCF supports reliable transaction and messaging Web API doesn't support reliable transaction and messaging WCF supports tcp, udp, http protocol and also custom transport protocol It supports only http protocol WCF uses Operation, Data contracts and services Web API uses routing, controller, action methods etc, same to Asp.Net MVC
Bind DropDownList in Asp.MVC using ViewData object

Bind DropDownList in Asp.MVC using ViewData object

Asp.Net, Asp.Net MVC, C#.Net
In our previous article we have seen how to bind ViewBag object to dropdown list, In this article we will see how to bind ViewData data to dropdown. Remember we can set any kind of data to ViewData like from database, from enum, from range, fixed value etc. Here we will take some fixed Work status list and save it to the ViewData and then in view we will bind ViewData object value to the dropdown as shown in below code snippet. Controller code Razor View code Above code will produce output as below image. You can see in the controller we have created a list of SelectListItem object, and then added 1 by 1 value to list. After adding all the required items to list, we have assigned it to the ViewData object, which we have used in the razor view while rednering drop...
Bind DropDownList in Asp.MVC using ViewBag object

Bind DropDownList in Asp.MVC using ViewBag object

Asp.Net, Asp.Net MVC, C#.Net
In our previous article we have seen how to bind fixed value from view and how to bind Range to dropdown list, In this article we will see how to bind ViewBag data to dropdown. Remember we can set any data to ViewBag like from database, from enum, from range, fixed value etc. Here we will take some fixed country list and save it to the ViewBag and then in view we will bind ViewBag value to the dropdown as shown in below code snippet. Controller code Razor View code Above code will produce output as below image. In the controller if you see we have created a list of SelectListItem object, and then added 1 by 1 value to the list. After adding all the required items to list, we have assigned it to the ViewBag object, In razor view we have used that ViewBag data for ...
Bind DropDownList in Asp.MVC using Range/Fixed value

Bind DropDownList in Asp.MVC using Range/Fixed value

Asp.Net, Asp.Net MVC, C#.Net
In most of the application we are using dropdown to select some value from predefined list of value. Some of them are getting bind from the database table, some of are getting bind using Enum value while some of them are getting bind using some fix value like 1 to 10, or month drop-down 1 to 12. In this article post we will see how to bind drop-down using range value in MVC. Below if the sample code which will bind 2000 to 2014 in year drop-down. above code will produce output as below image. In the above code we have just write a code in view only, there is no server side code. Now in some cases we need to bind some data which are not in particular range like "2000, 2002, 2004, 2006, 2008" or some string type fixed data then we can not use "Enumerable.Range", so how can w...
How to install and configure NopCommerce application?

How to install and configure NopCommerce application?

Nop-Commerce, Special Posts
How to install and configure NopCommerce shopping cart application. First you need to go to http://www.nopcommerce.com website. On the home page you can find a link to “Download for Free”, see the below Figure 1 for the reference. Figure 1 Now click on the download for free button and it will lead you to the http://www.nopcommerce.com/downloads.aspx page. On the download page you can see various option to download as displayed in the below Figure 2   Figure 2 Here we need to download source code (highlighted option) which is around 115 MB of the code. It is a full working source code. Now if you go to download folder once it is completed you will see a zip file for source code. In this article we will use NopCommerce version 3.80 If you extract .rar file t...
How to integrate SagePay payment form using Asp.Net MVC

How to integrate SagePay payment form using Asp.Net MVC

Asp.Net, C#.Net, SagePay, Special Posts
Introduction In Europe Sage Pay is independent payment service provider. It is one of the most trusted payment brands in Europe. Sage Pay makes payments safe and secure. Payment security and fraud prevention are two of their top priorities. Sagepay provides various integration option for your e-commerce website. Like 1. Form Integration 2. Server Integration 3. Server Iframe integration 4. Direct Integration In Direct integration, only your server will be save card data and host checkout page, while in all other 3 integration it will be save card data to the SagePay server and checkout pages will be there only. You do not need to create checkout page for that. Today we are going to understand how Form Integration will work. Setting in Web.Config Let's first list ...