Host Your Own NuGet Server or How To Create Local NuGet Server

I have recorded a video showing how to use and configure local nuget server. After watching this video you will able to learn
> How to create own nuget server application.
> How to host created application to IIS
> How to create nuget package and push to local/ your own nuget server.
> How to use pushed packages from Visual Studio.
Hope you will enjoy it…

Presentation Slides

Continue reading

Sample ASP.net MVC 4 project showing how to perform search or filter from collection of data (requested by folk)

Download Sample project from following link (Project Type: VS 2012 ASP.net MVC4)
http://sdrv.ms/14hsdoO
One of my folk requested to me to make a sample project on ASP.net MVC to show how to filter record from table. Here is the request from him;

Search by (LastName, FirstName, etc.. this value should be in a dropdown)
—- but it actually came from a search parameter table. It’s kind of a lookup table in a dropdown
Besides the dropdown there should be textbox where I can enter a value
Search by LastName (dropdown) <”hasibul”> in textbox

Continue reading

Kendo Grid in Action

Content

A curry of Dependency Inversion Principle (DIP), Inversion of Control (IoC), Dependency Injection (DI) and IoC Container

A curry of Dependency Inversion Principle (DIP), Inversion of Control (IoC), Dependency Injection (DI) and IoC Container using C#. Dependency injection using C#. Inversion of control using C#. IoC using C#.

Download sample – 77 KB Continue reading

Delegate in C#

Delegate in C#

I am not going to write formal definition here because you will find lots of definition of delegate by googling. Most of the time, new developer faces problem with delegate. They think actually what it is and why they use it instead of method.

In simple word: What is Delegate?
Delegate is a method reference in C# or Delegate is a function pointer in other language like C/C++.

Continue reading

Creating generic method or extension for searching through all the columns in DataTable in C#

Few days ago I worked on a project where database table has more than 80 columns. My client asked to create a search so that it can search through all the columns. So I have decided to create an extension method which will search through all the columns in DataTable. Creating generic method or extension for searching through all the columns in DataTable in C#.

It is difficult to write a SQL query (when table has many columns) which will search through all the columns.

Continue reading

Using Crystal Report in ASP.net MVC and creating generic report viewer

Download Project
This article describes how to show crystal report in ASP.net MVC.
Here I will describe two different ways for showing crystal report in MVC.
1. Showing crystal report using ASP.net web forms in MVC.
    A. In same window
    B. In different window
2. Showing crystal report from Controller/action (by generating PDF on fly).
    A. In same window
    B. In different window

Later I will describe how to create a generic/ common report viewer web form and generic/ common report viewer Controller class, which will be used for showing any Crystal report (with/ without data).

Continue reading

How to solve ” Could not load file or assembly ‘…’ or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0×80070057″ Error

Last day I have faced an error when I am compiling my ASP.net MVC application and this is for illegal shutdown of my computer.

Here is my Error: ” Could not load file or assembly ‘EntityFramework’ or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0×80070057 “

Similar types of Error:Could not load file or assembly ‘AjaxControlToolkit’ or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0×80070057 “

Continue reading

Master Detail CRUD Operations using ASP.net MVC 3 and EF

Master Detail CRUD Operations using ASP.net MVC 3 and EF. Master detail in asp.net mvc

Introduction

In this post I will discuss about how we can perform Master Detail CRUD Operations using ASP.net MVC 3 and Entity Framework (Code First).  Here I have used JSON (json2.js)  for data passing, Ajax for posting and DataTables (datatables.js) for manipulating detail Record.

Continue reading

Executing *.sql file form C#

Sometimes we need to run *.sql script from our application for installing data base. SqlCommand is not right for running installation script because installation script consists of DDL and GO command. Here we use smo library for executing *.sql script.

For doing above operation we need to add following references

Continue reading