PM's Blog

Pramod Mohanan's notes about ASP.NET, MVC, C#, SQL, jQuery, Bootstrap

c#

Dynamic resizing of Images

Front end users are free to upload images of any size, However for uniformity its often necessary to resize these images to a standard width and height but still maintaining the aspect ratio. The following function is what I use to to resize an image dynamically. The file thus returned can then be renamed and […]

Loop through properties of an object

I just had a need to loop through all the properties of an object and copy the values of the properties to another object of the same type. I just discovered that we can use System.Relection to get this done. For example two objects sourceObject and destinationObject are objects of class Person. using System.Reflection; namespace […]

PM's Blog © 2015