Facebook like link sharing

When you paste a URL in the FB share, FB pulls out some information about the URL along with any available images. I created a similar feature in ASP.NET few years ago and I got the project file while clearing out  one of my disk partitions and thought of sharing it. This project uses HTMLAgilitPack … Continue reading Facebook like link sharing

CRUD operations in Infragistics WebDataGrid

DataGrids are vital controls in many user interfaces. Like it or not still 2D tables are one of the most comfortable user interface elements in not only viewing data but also in performing rapid inserts and updates. CRUD operations of DataGrid is not a big innovation, but there are plenty of ways to do that. … Continue reading CRUD operations in Infragistics WebDataGrid

C# – implicit & explicit keywords

What are the uses of the implicit and explicit keywords in C#. implicit is used when we need implicit conversions between types. It works on value types and as well on reference types. The below code shows the use of implicit keyword. Create a class named Digit as below and note the two static methods … Continue reading C# – implicit & explicit keywords

Embedding Resources in Silverlight

This post explains how to embed a resource file in Silverlight and use it. For the example we’ll consider embedding a CSV file and using it. Copy the file inside the project under the appropriate path. In the properties of the file set the Build Action as Embedded Resource. The below sample code shows how … Continue reading Embedding Resources in Silverlight

Uploading a file to Azure Blob

Windows Azure storage provides flexible storage services. Blob storage is one of them which is used to store binary large objects.  Windows Azure blob has the concepts of containers (which you can think like partitions of a disk). Containers are either private or public. Private containers are only accessible to the user and application developer … Continue reading Uploading a file to Azure Blob

AES Cryptography

Contains the code for AES encryption and decryption in C#. 1: public byte [] EncryptText(string plainData) 2: { 3: RijndaelManaged rij = new RijndaelManaged(); 4: 5: rij.GenerateKey(); 6: _key = rij.Key; 7:  8: rij.GenerateIV(); 9: _intializationVector = rij.IV; 10:  11: ICryptoTransform encryptor = rij.CreateEncryptor(_key, _intializationVector); 12:  13: using (MemoryStream msEncrypt = new MemoryStream()) 14: { … Continue reading AES Cryptography