Author Archives: amirulkamil

Encrypt/Decrypt “ConnectionStrings” in Web.Config

An article by Yasmin Khakku in CodeProject discuss comprehensively on how to encrypt/decrypt connectionStrings.

    1. Open cmd with administrator privileges.
    2. Enter command:
    3. Enter following command to encrypt the connectionStrings:

The encrypted connectionStrings will look something like this:

To decrypt the encrypted connectionStrings enter command:

 

Execute SSIS Packages From C#

This is how you can execute SSIS packages using C#. Thanks to Sandeep’s blogpost in CodeProject.

 

Populate Datagridview Combobox From DataSource

This is how you can populate datagridview combobox from datasource and set it as default.

 

Get Precise Last Date For Any Month

I have a requirement to find every data between two dates. The date is the start date of any month in any year until the end date of any month in any year. The start date is easy as any month will have 01 as a start date but the end date differs for any month as it can end on 30, 31, 28 or 29. The solution is to add 1 to any month that is selected as the end date to get to the first date of the month and subtracted a day to get the end date of the selected month. Click here for more information.