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

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

Read XML file and display data using asp.net MVC

In this article I am going to explain how to read XML file and display data using asp.net MVC.


Description:
I have XML of student detail. I want to read this file and display its data.

Export table to Excel file using Angularjs in asp.net MVC

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


Description:
When I am working on project I have got a requirement to export the table to excel file. I have got a simple solution to fulfill this requirement. I have found FileSaver.js.
[Solved]: XML parsing: unrecognized encoding

[Solved]: XML parsing: unrecognized encoding

In this article I am going to explain how to solve the XML parsing: line 1, character 39, unrecognized encoding error.

Description:
When I am working on XML file I have got an error “XML parsing: line 1, character 39, unrecognized encoding” in asp.net.

Solution:
This error is occurred because of encoding issue. SQL Server expects the XML file should be UTF-16. We have to change the encoding from utf-1, utf-8 to utf-16.

Draw Stacked column chart using Google chart API in asp.net MVC

In this article I am going to explain how to create stacked and multi series column chart using Google chart API in asp.net MVC.


Description:
I want to draw a chart to show how many male and female in Indian states. We have two approaches to draw chart. First we can create multi series chart and second can draw stacked chart.

Implementation:
I have created a table Tb_Statewisepopulation and insert dummy data into it.

Stateid
int
StateName
varchar(100)
Male
int
Female
int

I am using data first approach in MVC application.
Sql server : Show 0 instead of null value

Sql server : Show 0 instead of null value

In this article I am going to explain how to show 0 instead of null value in sql server.


Description:
We have three alternatives to show 0 instead of null value in Sql.