Posted by Mohammad Mahdi Ramezanpour
on
• Comments
(4)
Yesterday, one of my best friends, Omid Mafakher, called and told me about one of his project which he’s working on for a while and as I checked it out, realized that this is so cool so I decided to share it with you too.
I know there are some Asyc File Uploaders available right now like AjaxControlTookit.AsycUploader and such but this control is something different! Actually, you may have seen such a thing on a few websites like Google and Facebook!

Besides, there are lots of useful features in this library as well like image resizing, watermark, background and foreground settings, etc.
Here’s the list of key features:
- Upload file up to any size in .NET.
- Validate the file (size, type) before uploading.
- Upload with progress (Size, Speed, Time, Total Size, etc.)
- Upload to temp file during upload.
- Save uploaded file with too many configurations.
- Manage the Image file and save in any format (PNG, JPG, GIF, BMP, etc.)
- Save image in any size.
- Resizing styles: "Center, Tile, Stretch, Zoom, CenterIfNoZoom, Corp (Facebook style)".
- Set the Background and Foreground in your image.
- Change the image Alpha and Resolution.
- HttpHandler for generating images.
- HttpModule for generating unsaved or deleted images.
- web.config Section for Multiple settings to save file and image.
- web.config Section to manage HttpHandler and HttpModule.
Fortunately, my friend has published it in CodePlex as an open source project so you can enjoy using it for free! You can click the link below to access and download this library from CodePlex:
http://managemedia.codeplex.com/
I highly recommend you to check this out! And comment your feedback here or in its official CodePlex page.
Hope you like it.
Posted by Mohammad Mahdi Ramezanpour
on
• Comments
(1)
Microsoft Excel is one of the most popular applications in business. Most people are familiar with it because it’s very easy to use and productive.
One of the most important things in developing enterprise applications is integration and developers should integrate their applications with other popular apps. For example, exporting data as PDF is something which is critical in some of enterprise applications because PDF is standard and most people have Adobe Acrobat these days; so if user wants to send data to another person as a report or something, the data must be exported to a standard format so the person can open it!
Excel is now popular especially in accounting or any other applications that have complex calculations. Since the Excel is so good, companies have to integrate their apps with Excel too!
I’m currently developing an enterprise application and I needed to add Microsoft Excel integration to it because most of our users request this feature!
As a matter of fact, I don’t want to describe how you can do it step-by-step. What I want to do right now is to introduce an open source .NET library that can be used in order to export data to Microsoft excel and the name of the library is: EPPlus.
EPPlus is a .net library that reads and writes Excel 2007/2010 files using the Open Office Xml format (xlsx).
EPPlus supports:
- Cell Ranges
- Cell styling (Border, Color, Fill, Font, Number, Alignments)
- Charts
- Pictures
- Shapes
- Comments
- Tables
- Protection
- Encryption
- Many more...
Advantages over others:
- Totally rewritten using dictionaries
- Can now load 50 000 cells in seconds
- Complete integration with .NET
- Loads of extensions
One of the good points about EPPlus is the LINQ integrations and IEnumerable support so you can use whatever data source want!
Another great feature of this library is the ability to create charts right from your code!
For more information and samples about this library, check its page CodePlex: http://epplus.codeplex.com/
I hope it helps.
Posted by Mohammad Mahdi Ramezanpour
on
• Comments
(2)
Today I’ve developed a class library which manages some text validations and named it “RegularExpressions.cs”. It was an easy-to-develop class but, some of the expressions were good. It uses the System.Text.RegularExpressions.Regex class in order to check for the validations. In this post, I’m going to name some of the most useful regular expressions, you may need in your usual developments.
Numeric:
Pattern: ^[-+]?\d*\.?\d*$
Matches: 123 | +3.14159 | -3.14159
Non-Matches: abc | 3.4.5 | $99.95
Email Address:
Pattern: ^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$
Matches: asmith@mactec.com | foo12@foo.edu | bob.smith@foo.tv
Non-Matches: joe | @foo.com | a@a
URL:
Pattern: ^(http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+&%\$#\=~])*$
Matched: http://www.blah.com/~joe | ftp://ftp.blah.co.uk:2828/blah%20blah.gif | https://blah.gov/blah-blah.as
Non-Matches: www.blah.com | http://www.blah"blah.com/I have spaces! | ftp://blah_underscore/[nope]
For complete list of useful regular expression you can check out: http://www.regexlib.com/