Free Asp.Net,MVC,AngularJs,Jquery,Javascript,Sql Server,WCF,Entity framework snippets and tutorial

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.

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.

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

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

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:

Sql server: Insert multiple tables data into another table

In this article I am going to explain how to insert multiple tables data into one table in sql server.


Implementations:
I have created 2 tables Country and state, insert some dummy records into it. I want to insert country and state name into another table (countrystate).

Add Facebook like, share and comment in asp.net website

In this article I am going to explain how to add Facebook like, share and comment box in asp.net website.


Implementation:
I want to add Facebook like, share and comment box to asp.net website. First of all open Facebook developer’s link https://developers.facebook.com/. You will see docs options in top menu, click on it. Documentation option page will be open and you can lot of options there. Look for social plugins under product docs.

Upload and read text file in asp.net

In this article I am going to explain how to upload and read text file in asp.net.


Description:
I want to upload and read the text file. Text file will be save to folder and content of text file will be displayed in textbox.

Upload and read word document in asp.net

In this article I am going to explain how to upload and read word document in asp.net.


Description:
I want to upload and read the word document. Word document will be save to folder and content on doc will be displayed in textbox.

Asp.net : Get MAC address of system

In this article I am going to explain how to get MAC address of system using asp.net.


Implementation:
MAC (Media access control) address is the unique identifier of each device. To know MAC address go to command prompt and type ipconfig/all, hit the enter button.

Asp.net : Get MAC address of system

Sql Server: Get records from/after specific record/id

In this article I am going to explain how to select records after a specific record/Id in sql server.


Description:
I want to get records from a specific record or id. I have created a table Tb_Country and insert some dummy records.

Generate limited random number and add hyphen (-) after each 4th character in asp.net

In this article I am going to explain how to generate limited random number and add hyphen after each 4th character in asp.net.


Description:
I want to generate 16 unique number and after each 4th number insert hyphen (-).

Sql Server : Check string is Palindrome or not

In this article I am going to explain how to check string is Palindrome or not using Reverse function or without reverse function in sql server.


Description:
I want to check given text/string is Palindrome or not. Simplest way to check is using reverse function.
* Palindrome means word that reads same forward as backward.

Create text file and download using asp.net

In this article I am going to explain how to create text file and download using asp.net


Implementation:
I want to create text file and download it on button click. I have created example to fulfill this requirement.

Create column chart in asp.net

In this article I am going to explain how to create column chart using Chart control in asp.net.

  
Implementation:
I am using chart control to draw column chart.
I have created a table Tb_Population and insert some dummy data.

Id
int
StateName
varchar(200)
TotalPopulation
bigint