Monday, June 26, 2017

ASP.NET MVC : Export data to Excel

In this article I am going to explain how to export data to Excel file in asp.net MVC.


Description:
I have created a table Tb_Movie and insert some dummy data into it. I am showing the list of movies and want to export data to Excel file.

Implementation:

Sunday, June 25, 2017

Asp.net : Check uploaded image is Grayscale or not

In this article I am going to explain how to check uploaded image is Grayscale or not in asp.net.


Description:
Some of application form only accept Grayscale or black & white scanned photograph and signature. In this example I am going to check image size, dimensions and color.

Implementation:

Thursday, June 22, 2017

Check dimensions and size of image before uploading in asp.net

In this article I am going to explain how to check height and width (dimensions) and size of image before uploading in asp.net


Description:
I want to upload the image which have dimensions less than 100 x 120 and size 20 KB. Firstly I have check the image size with height and width, if image size and dimensions is less than the require dimensions then it will be uploaded.

Monday, June 19, 2017

Asp.net Fileupload control

In this article I am going to explain about Asp.net Fileupload control.


Description:
We use the Fileupload control to upload the files. Here I am going to explain all about Fileupload control like how to set file type, validate file type, file size etc.

Friday, June 16, 2017

Sql Server: Insert all records of table to another existing table

Tuesday, June 6, 2017

Asp.net : Export multiple Datatables data to Excel file using CloseXml

In this article I am going to explain how to export multiple Datatables data to excel file using CloseXml in asp.net.


Description:
I want to export multiple tables data to excel file. To fulfill this requirement I going to use CloseXml. You can download and add its reference to your application or can install package using Nuget. Run the below command in Nuget package manager:

Install-Package ClosedXML

Sunday, June 4, 2017

Asp.net : Export Datatable data to Excel using CloseXml

In this article I am going to explain how to export Datatable data to excel using CloseXml in asp.net.


Description:
I want to export table data to excel. To fulfill this requirement I going to use CloseXml. You can download and add its reference to your application or can install package using Nuget. Run the below command in Nuget package manager:

Install-Package ClosedXML 

Login using Facebook account in Asp.net MVC

In this article I am going to explain how to integrate Facebook login in Asp.net MVC website.


Description:
I want to add Facebook login to MVC website. I am using Facebook JavaScript SDK. To use Facebook JavaScript you need an Application (App) ID. To create and get App id check this article: How to Create Facebook app forwebsite.

How to Create Facebook app for website

In this article I am going to explain how to create Facebook app for website.



Implementation:
Firstly you have to login Facebook account and go to https://developers.facebook.com/.
At the top of page on right side you have seen your profile image, click on it or hove it. You will be see your previous created app and option for create new app, click on it.  Now follow the below given steps: