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

Entity Lifecycle

Entity Lifecycle in EntityFrame Work:-- Before working on entity framework on asp.net, It's important to know the entity (like any table, list etc.) life cycle and how it is managed by the entity framework. During entitys lifetime, each entity...

Customizing Routes In MVC

Customizing Routes :- In MVC application we are using routing for mapping the URL structure. But sometimes we have situation to change the URL structure according to the requirement. For achieving the requirement,...

Setting Content Type of a azure blob

When we upload a file on azure blob in byte array format or in any other format then by default it is uploaded as a content type of stream. As a result of it, when we try to get that file from a browser it always starts downloading the file. It ...

Exporting SQL Server table data to Excel

Hi Readers ! In this Blog we will find how we can Export SQL Server table data to Excel using .net code . using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.Web...

How to show folder structure using TreeView control in Windows Form Application using C#.

Hello All, Working with Windows form application using C# while developing desktop application, many times we need to show the folder structure in TreeView control, and to do that we have the following code : private void btnShow(object...

How to serialize a class in C#

Hello All, Working with ASP.NET C#, I wanted to serialize a class to a file which will be later de Serialize to access its properties and delegates, and to do this we have following block of code : Structure of the class to be Serialized : ...

What is Xamarin

Hello All, In this blog, we will have a brief discussion on Xamarin. Xamarin is basically a tool for Cross Platform Development of Android, iOS and win forms.You can visit the Xamarin website https://xamarin.com/ and you can find more detail...

DNN Outsourcing - A Cost Effective Option for Enterprise Application Development

One of the oldest and the worlds largest open-source web application framework, DotNetNuke (DNN) has been helping its clients manage information on their respective websites, intranets, and extranets since long utilizing Microsofts ASP.NET quite ...

Select an item in dropdownlist by text programmatically

To understand this, consider the following code: //Dummy DataTable DataTable dt = new DataTable(); dt.Columns.Add("EmployeeName"); dt.Columns.Add("EmployeeId"); for (int i = 1; i <= 10; i++) ...

.Net Code to Create new Database and Table in SQL Server

Hello readers! In this Blog we will understand how can we create new database and new table in SQL Server using .Net . SQL provides statements to create new databases and tables. In the Code below we are executing those statements to create ...

How to make validations in Asp.Net MVC

"How to make validations in Model Class using Asp.Net MVC "     In this article we will learn about validating Model using Data Annotations . Data Annotations provides us Metadata that describes some set of rules, with the...

How to show multiple pins at same Lat Lng

"Adding multiple pins at same LatLng" In this article we will see how to add multiple pins at the same Lat Lng in the Google Map.     While working with Google Maps, I faced a problem that, we are not able to show multipl...

http To https Redirection In ASP.NET

Hello Friend, Many times we need to implement SSL (Secure Socket Layer|) certificate on website for data security. After SSL implementation you don't want to allow page access through http://. If any one try to access website using http://...

Extension methods in c#

Hello Friends, In this blog I will explain what is Extension method in c# ? Extension Methods:- Extension method helps you to add new methods to an existing types (like any Predefined dll or class etc.) without creating new derived types or ...

How to play video online using .Net

"How to play video online" For cutting a frame from a video, please refer to my following blog: Cut frame from a video In this article we will take a overview on cutting a frame using ffmpeg.exe file and then will discuss how to play t...

How to cut a frame from the video using .Net

"How to cut a frame from the video using .Net" In this article we will see, how we can cut the first frame of our video and save it as a jpg image using ffmpeg software. To download the ffmpeg software please go to the following link: Do...

Finding the current domain address using MVC

I came across a requirement where i had to find the current domain address of the app as i had to send an email to users with a public page url. I knew the virtual address of page but it would not work as in order to open a page from my website u...

Open Android App from Web Browser & Get Data from The App & Return Back to Web Browse

Sometime we a have a situation in which we use android app in our web application.In that situation you can use this. For opening the android app first we have to check 2 conditions . 1. If the device is android or not. 2. In the android dev...

How to customize Keyboard shortcuts in Visual Studio

"Find and Customize Keyboard shortcuts in Visual Studio" As the use of shortcuts while development saves alot of time. In this article we will see how we can identify and customize the keyboard shortcuts in Visual Studio. Getting Started...

What is Nullable Type in C#

The Nullable Types in C# language: The nullable data types were included to value data types with C# language in the year 2005. This feature allows us to assign the null value to a value-type variables. You need this functionality with databa...

Common Conventions for Writing Code in C#

Except from the rules which C# compiler enforces, there are common conventions for writing code in appropriate way. If we use these conventions, it will make our program consistent and easy to read for others. Although for compiler...

Delegates in ASP.NET C#

Hello all, In C#, we use delegates, which are nothing but the type safe function pointer which means that a delegate points to a function and whenever we invoke the delegate, it will call the function for which it holds the reference. The s...

How to perform method hiding in ASP.NET C#

Hello all, To understand the concept of method hiding C# lets consider an example where we have class (User) that have some properties and methods. Ex. public class User { public string fisrtName { get; set; } public string last...

Different ways to pass data from controller to view in Asp .Net MVC

"ViewData vs ViewBag vs TempData vs Session" There are following four ways to pass data from controller to view in Asp .Net MVC:- ViewData ViewBag TempData Session Overview: Let us see them in more detail...

Finalization Queue in .Net Garbage Collection

"Finalization Queue in .Net Garbage Collection" In this article we will see the detailed working of the Garbage Collector and the Finalization Queue. For reading about the Garbage Collector please go to the following link: Garbage Colle...

Different ways for returning a view in ASP.NET MVC

"Different ways for returning a view in ASP.NET MVC"     In this article we are going to learn about different ways that can be used to return a View in Asp .Net MVC. There are different ways for returning a view in As...

How to use Attribute Routing in ASP.NET MVC

"Attribute Routing in ASP.NET MVC"     Routing is a major concern in a MVC application, I have already discussed about the Routing Basics and Customization of routing. Please find below the links for reference: Basic...

How to customize routes in Asp.Net MVC

"Customizing Routes in ASP.NET MVC"     In my earlier blog on "Basics of Route Config in Asp.Net MVC", I have discussed how the Routing is performed in Asp.Net MVC. Please go to following link for reference: Basics of R...

Find all controls in WPF Window by type

Hi Friends! Often we need to loop through the controls (collection of TextBlocks in) to and find them by their types. We can find them in this way:- object control= LayoutRoot.FindName(txtname.Text); if (item is TextBox) { ...

Different types of JIT Compiler

"Different types of JIT Compiler" JIT (Just In Time) Compiler is used to convert the MSIL code to the Native code, It is of following three types:- 1.Normal JIT:-             &nb...

Difference between Finalize and Dispose method

"Difference between Finalize and Dispose method"     Finalize and Dispose are the two methods provided by the .Net Framework for releasing the unmanaged resources like files, database connections etc. Let us understand...

What is Connection Pooling in Enity Framework / Ado.net

Hello Friends, In this blog we will try to understand what exactly ADO.NET/ Entity Framework connection pooling is? And we will also go through some important points related to connection pooling. So lets start with few basic:-- What is con...

How to protect .net applications from reverse engineering

When we write code and compile them,our class files are converted in to Dlls, and we assume them as safe. But those Dll files can be used for backtracking to your code,your application logic and your secret algorithms(If you have any). What?Are ...

Upload files with HTTPWebrequest (multipart/form-data)

Hi, Some times we need to upload files on a web server using HttpWebRequest. For that first we need to define a model (class) that represents the uploaded file property. public class UploadFile { public string Name { get; set; ...

How to force a .NET Application to run as administrator ?

"Force a .NET Application to run as administrator "     While working on a .Net app, I got a requirement to make the app to run as administrator. The solution I found is as follows: Step 1: Create your .Net Applicati...

Difference between Float, Double and Decimal Data Types

"Difference between Float, Double and Decimal" Float Double Decimal Float is a 32 bit floating binary point data type, it represent a number like 10001.10010110011 Double is a 64 bit floating binary point d...

Sending WhatsApp Message in .Net

This time I am here with a very small article about sending WhatsApp Message from your .Net application. You need following things for that. 1-WART(WhatsApp Registration Tool) This a tool with which you can get the password to be used in API...

Using Gmail credentials to send mail in .Net application

Lets consider a task on hand , we need to add a contact us form which takes in few inputs from the user and on submission mails the details to the administrator. The requirement says that the mail should be sent using Gmail SMTP client. The solut...

Garbage Collection in .Net

"Garbage Collection in .Net"     Memory Management is one of the major concern for every Application, In .Net the CLR is responsible for that. Overview:   Garbage Collection is an automatic process o...

How WPF is better than Winforms?

These are reasons that why WPF is better than Winforms: A->Any where Execution(XAML) : Any where Execution means you can create your UI once in WPF and then run it as window application or run it as web application. This is possible because...

In C#, should I use string.Empty or String.Empty or ?

Hi... In my previous blog, I have already mentioned that String and string both are same as string is just the alias name for String or System.String. So we can use either String.Empty or string.Empty, it doesn't really matter. Now the quest...

What is Windows Presentation Foundation

Windows Presentation Foundation is a next level GUI framework as compared to WinForms, which provides impressive user interfaces in windows based applications. Earlier it was known as Avalon and was first released as a part of .NET 3.0 framewor...

WPF vs. WinForms

Hello Friends, This blog explains a subjective list of the key advantages for WPF and WinForms. WPF advantages Comprehensive Integration -WPF offers a uniform environment for using text, video,speech, 2D and 3D graphics. We Can incorpor...

Why switch to WPF?

WinForms still exists with WPF in Visual Studio. It is still in use but getting outdated as software user interfaces are getting more demanding in terms of speed and slick animations In this article It is mentioned that WPF is not created to repl...

How to upload file with size and extension validation in asp.net

Hello All In asp.net we can upload the file by using file up-loader control. but at times we have to apply some validation to avoid user to upload malicious file which might harm our application. These validation can be of many types like :...

ASP-Net-MVC-The CRUD-Part -2 Details Update and Delete

Hi Friends! I hope you'll be waiting for the next part of my previous CRUD article. So let's go for it. We'll perform the rest of the actions in following sequence. 1-Details 2-Edit/Update 3-Delete Before moving to any method ,we need to...

How to handle error globally in asp.net web api

Hello All, Working with asp.net web api, we have multiple ways of handling error that is at controller level, method level we can use try and catch block and we can put our logic there to handle errors. But to handle error occurred any wher...

A numeric only text box in web application

A lot many times when creating web applications it so happens that we need to accept numeric vales i.e. which accepts positive, negative numbers , whole numbers or decimal numbers. Its easy, show a message on the page that the particular field ne...

What is difference between String and string in C#

C# defines number of alias names for CLR (i.e. Common Language Runtime) types. Technically, there is no difference between string and String, as string is just the alias name for System.String or String. System.String is a static sealed class, w...

How to handle IndexOutOfRangeException

"Handling IndexOutOfRangeException"     Before learning how to handle this exception, we should know why this Exception is thrown IndexOutOfRangeException:     This Exception is raised when we are ...
1 11 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: