Saturday, 20 December 2014

Generate pdf using rdlc c#

In this article I will demonstrate you how to create rdlc report in

Microsoft made it very simple to generate PDF by using the “Microsoft.ReportViewer.WebForms”
Take the reference of Microsoft.ReportViewer.WebForms to work with RDLC. It will appear in your reference folder like below;


Thursday, 18 December 2014

Convert number to words c# code

In many applications you need to convert numbers into words like in bank statement invoice or converting the currency values into words.
Below application will really help you to convert the numbers into words.
You just need to pass the numbers like; “23456” it will convert Twenty Three Thousands Four Hundred Fifty Six.

Application will support till the lakhs if you want to extend it you can extend till what you need.

Friday, 12 December 2014

stylecop visual studio


A simple design page : When inserting the Name checking the text value



Setting of Style Cop Rules and Properties



Rule Selection

a) Click on the check box to check or uncheck the rules to apply for code analysis, By default it is checked for all rules


Company Information


Run the style Cop to check the code analysis

Either from Toolsà Run the Style Cop

Or Right click on project explorer à Run the Style Cop



When you run it it will give the Warnings if it will break the rules.


On Running the Style Cop


Output Code snippet

After rectifying all the warning by Style cop getting result Violation count : 0


Exclude the Particular File from Style Cope


Creating Custom Rule

Steps to Creating Custom rule

1> Creating One Class Library file

2> Import the two DLL and reference it to project

using Microsoft.StyleCop.CSharp;

using Microsoft.StyleCop;

From C:\Program Files\Microsoft StyleCop

3> Add one XML File for configuration

4> Successfully Build the code in Release mode

5> Place the DLL into

C:\Program Files\Microsoft StyleCop

Code Snippet for Custom Rule to Check Data Base is Closed or Not “.CS file”


XML Code Snippet


Get the Custom Style Cop Rule into project


Custom Warning


Tuesday, 9 December 2014

c# combine multiple pdf into one

*Note : Take reference of itextSharp API DLL reference to work with below application

We were facing the problem of creating the multiple PDF file and send it to clients. So they have to take the print of PDF one by one so, created the application to combine multiple PDF files into one PDF.