Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Using async with ASP.NET MVC 5

ASP.NET has a pool of threads to service incoming requests. Once a new request is received a new thread is picked from the thread pool to service this request and this thread cannot serve any other request until the current request gets complet...

ASP.NET MVC 5 : New Features

ASP.NET MVC 5 is the a major new release which has introduced new features as below: 1) One ASP.NET On selecting a New Project from the VS 2013 unlike in previous version we will see one template called ASP.NET Web Application.After ...

OCR in .NET

OCR means Object Character Recognition . It is a technique by which we select a portion of the image as per user need. This process requires getting the dimension of selected screen and converting in an image for use. These are the pre-proc...

Use of Using keyword while making connections

We always use SqlConnection class for making connections 1 Simple SqlConnection SqlConnection=new SqlConnection() If any exception occurs inside while block it throws exception the connection.close() process will not executed due ...

Get both text and value of selected option in a dropdown in Asp.Net MVC

How to get both text and value of selected option in a dropdown in Asp.Net MVC? While working in a MVC project, I got a requirement where I needed both Value as well as Text of the selected option in the Dropdown. The solution that ...

INTRODUCTION OF C#

C# is an object-oriented programming language which is developed by Microsoft. Mr. Anders Helsberg developed C# with his team during the development of .Net Framework. C# was approved by ECMA and ISO. ECMA-"European Computer Manufacturers As...

ASP.NET MVC HTML Helpers

We use HTML helpers in a view to render HTML content. An HTML Helper is simply a method that returns a string. The string can represent any type of content that we want to define. The ASP.NET MVC framework includes the following set of stan...

ASP.NET MVC Areas

We already know that ASP.NET MVC framework includes separate folders for Model, View and Controller. However a large application can include a large number of controller, views and model which is difficult to manage. Areas help in splitting such ...

ASP.NET MVC Life Cycle

In a MVC application the requests are routed to a special class called the Controller. The controller is responsible for generating the response and sending the content back to the browser. When an MVC application receives request the action m...

Client Side and Server Side Controls

In .NET Framework we have two types of controls: 1 Client Side 2 Server Side   Client side controls are HTML controls usually used for client end. Ex : <input type="button" />   Server Side controls ...

ASP.NET MVC : ActionResult Types

An ActionResult is a return type of a controller method in MVC. We can return various types of results as ActionResult. Here, we will discuss about some of the ActionResults available as part of ASP.NET MVC. 1) ViewResult It renders a sp...

ASP.NET : Use of AllowAnonymous attribute

The AllowAnonymous attribute was introduced in ASP.NET MVC 4.This attribute is used for specifying those controller actions that can be accessed by anonymous users. For using this attribute we use a global authentication filter for the appl...

Comparison of Asp.Net Web Form and Asp.Net MVC

Asp.net framework is a part of .net platform for building web applications. Now, with arrival of MVC framework developers have the option of using Asp.Net Web Form or Asp.Net MVC. In this article, we will see the main difference between Asp.Net W...

ASP.NET MVC : Filters and Attributes

ASP.NET MVC provides a simple way to inject the pre-processing and post-processing logic for an action. This is achieved by adorning the controllers/ actions with ASP.NET MVC attributes. For example in the below piece of code we have adorned ...

Sending Push Notification to Android device using GCM C#

In one of my current project, I had to develop and integrate the Android Push notification functionality in my server side C# code.For this purpose, i used the Google Cloud Messaging service. Here is code for the same. public void Se...

Different states of activity in xamarin.android

Hello All, In this blog we will discuss about the different states of the Activity of your application running on any device or the emulator.So the first one of the highest priority one is going to be the Active state or the running state whic...

Activities in Xamarin.Android

Hello all, In this blog, I will continue on my previous blog What are the building blocks of Xamarin.Android , and we will discuss about the building blocks of Xamarin. One of the most important and interesting building block of the Xamarin...

How to change the default controller in ASP.NET MVC

Many times we need to change the default controller in ASP.NET MVC. To change this first we need to understand how the default route is configured. This setting is available in RouteConfig file (under App_Start folder). routes.MapRoute( ...

How to overload the action Method in ASP.NET MVC

In this article we will see how to overload the action Method in ASP.NET MVC. Overloading is the scenario where we have two methods with the same name but different signatures. At compile time, the compiler finds out which method it is going t...

Comparison of ViewData, ViewBag and TempData

Generally in ASP.NET MVC we use the ViewData,ViewBag, and TempData objects for the purposes of moving data beween views or from controller to views.In this post we compare them against each other higlighting there difference and usage patterns...

How to use TempData to pass data ?

ASP.NET MVC TempData object is used to share data between controller actions.It is a dictionary object derived from TempDataDictionary. The value of TempData persists until it is read or until the current users session times out.TempdData can b...

How to handle Error 404 in ASP.NET MVC

In the following article we will learn how to handle 404 errors in ASP.NET MVC gracefully. The first step will be to set up the custom errors page by making the following settings in web.config: <system.web> <compilation d...

Sending notification to IOS device using C# code

In one of my current project, I had to develop and integrate the IOS notification functionality in my server side C# code. I did some RnD for this and found below mentioned code to serve this purpose. public void SendNotification(string device...

ASP.NET MVC: How to Check Session Timeout and Redirect to Login Page

The following post captures the implementation details to manage session timeout in ASP.NET MVC. If session has expired we will redirect the user to login page First you need to make modificaions in web.config as below: <system.web>...

Create an ASP.NET MVC controller that returns an Image

It is a common requirement where we need to create a controller that simply returns an image. Following is one of the possible solutions for implementing the above functionality. We need to add the following code on controller page public...

How to Upload a file in ASP.NET MVC

The following post captures the implementation details for uploading file in ASP.NET MVC. First we need to create HTML form which would receive the file as input: @using (Html.BeginForm("Index", "Home", FormMethod.Post, new { enctype = "m...

How to create a dropdownlist from an enum in ASP.NET MVC

Many times in an application we need to populate a dropdown list from enum.In the following article I will show how to implement the same using SelectListItem. First we create an enum, FileType, under the Models folder as shown below. na...

.NET must have tools

1) .NET Reflector Reflector is used to examine and decompile. NET assemblies in IL, C#, and Visual Basic. You can view the class hierarchies of .NET assemblies, without having source-code for them. This is a must have for any .NET developer...

Install Internet Information Services (IIS) 7.0

Applies to these editions of Windows/Vista Home Premium Business Ultimate Enterprise *To install IIS with default settings* First Click the Start button, then click Control Panel, then click Programs, and finally click Turn Windo...

HOW TO USE DELEGATE IN C# and ASP.NET

Delegate is a type which holds the method(s) reference in an object. It is also referred to as a type safe function pointer. Delegates concept will match with function pointer concept of c++ language. We use delegate keyword when we need to c...

MVC Navigation from one View to another

**HTML.ActionLink** We while creating MVC application need to navigate from one View to another. The usual and simple way that we use is to use HTML elements "a" with its href attribute set to a specific controller's action, this is most obvio...

Asynchronous Programming : Use of Async and Await

This is an introductory post on how to use the async and await keywords in C# to create asynchronous background tasks. It is a common practice to use multi-threading and asynchronous tasks to avoid performance bottlenecks and to keep the appl...

What are the building blocks of Xamarin.android

Hi, In this blog I will continue on the blog I earlier posted What is Xamarin, and we will discuss about the building blocks of Xamarin Android. Application. Android Manifest Assembly Info Xamarin.Forms Resources Activity Class e...

How to show checkbox selected using MVCCheckBoxList in Asp.Net MVC

How to show checkbox selected using MVCCheckBoxList in Asp.Net MVC In my previous blog I have discussed about how to use MVCCheckBoxList. Please visit the following link for reference: MVCCheckBoxList in Asp.Net MVC Issue: The problem w...

How to bind RadioButton using Enum in Asp.Net MVC

How to bind RadioButton using Enum in Asp.Net MVC For binding RadioButton using Enum in Asp.Net MVC, we have to follow the following steps:- Step1: First create the Model class say 'RegisterationModel' in the Models Folder for the RadioBut...

How to use CheckBoxList in Asp.Net MVC

How to use CheckBoxList in Asp.Net MVC For using CheckBoxList in Asp.Net MVC, we have to follow the following steps:- Step1: First download the CheckBoxList from Nuget, Once it is downloaded we can see the reference of MVCCheckBoxList in ...

How to make a Grid in Asp.Net MVC

How to make a Grid in Asp.Net MVC In this Blog we will see, how to make a Grid using WebGrid in Asp .Net MVC. Step 1: Create a MVC application. Step 2: Now make a Model say Student which will hold the data to be displayed in the Grid. ...

How to bind DropDown using model in Asp.Net MVC

How to bind DropDown using model in Asp.Net MVC For Binding the Dropdown using Model, we have to follow the following steps:- Step 1: First create a model as follows:- Example: Public Class DropdownBind { public List<SelectListI...

Using var dataType in C#

What and why we need to use Var dataType? This is one simple question that many of us might not know. So here it is, illustrated with a simple example: When we declare any variable as int i = 0; this is an explicit conversion. But when we wri...

Generic DropdownList in MVC

Hi All, We in most of our projects in MVC come across creating dropdown list, that can be tricky sometimes. In this blog you all will get a preview of creating a generic function for creating dropdown for any list. The first thing we need t...

How to bind a Dropdown without using Model in Asp.Net MVC

How to bind a Dropdown without using Model in Asp.Net MVC For Binding the Dropdown without using Model, we have to follow the following steps:- Step1: Firstly in the Controller create an instance of List<selectlistitem> and add items ...

Bundling in Asp.Net MVC

Bundling in Asp.Net MVC What Bundling is actually:         It is a process of grouping files into a Bundle, so that they can be loaded through one HTTP request and can be referenced by a unique Bundle Name. Need of B...

How to replace only Year of a DateTime variable

How to replace Year of a DateTime variable with the Year of another DateTime variable in C# While working in a project, I got stuck in the following issue :- I have to compare the year of OldDateTime variable with NewDateTime variable. But ...

Using Union All in Linq

This is a simple example of how we use UNION ALL in Linq. In fact there is no UNION ALL operator in Linq but we have an equivalent of UNION ALL as Concat operator. So suppose we have two list (oldEmployees and newEmployees) which hold name...

Asp .Net MVC HTML Helpers

Asp .Net MVC HTML Helpers :-- HTML helpers helps to render HTML controls (Like TextBox, label,Checkbox etc) in the view.Suppose you want to display a TextBox and Label on the view,you need to write below html helper code in view:-- @Html.T...

Difference between ViewBag, ViewData, or TempData in MVC

Difference between ViewBag, ViewData, or TempData in MVC:- In Asp.Net MVC you have three ways to pass data from controller to view and in the next request. They are ViewData, ViewBag and TempData. ViewData:- Viewdata helps to maintains da...

Sending Text Message using Twilio

Here I am sharing sample code for sending Text Message using Twilio dll. Twilio provides service to send Text Message, MMs and Voice Messages etc. In order to send message using Twilio we first need to install Twilio package from nugget Package...

MVC Action Results

MVC Action Results:- ActionResult is a return type of a controller method,it's also called an action method. In MVC by default the controller actions will return the ActionResult Object. You can return various types of...

Deleting all files (blobs) of an azure container on criteria of file modified date

In my last project I came across a requirement where I had to delete all the blobs from a container using a criteria for modified date with azure web job. The criteria for deleting the files were to delete the files whose last modified date t...

Open a Notepad and Excel to read-write in .NET

Open a Notepad and Excel to read-write in .NET Suppose, if we required in our application to save the data in text format or in an Excel format for the analysis purpose, then there will be a need to open the Notepad and Excel and read-write da...
1 10 16
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: