A C# method that resizes pictures and maintains their aspect ratio, optionally only if a maximum width is exceeded. The method works with both images that have a higher height than width and viceversa.
Sending emails using C#
A sample code on how to send emails with .NET Framework 2.0 using C#. The code authenticates to a SMTP server and then sends an email to multiple recipients. It can easily be used in ASP.NET 2.0 websites.
Escape Unsafe XML Characters
Before introducing data into XML clients, be it within tags or attributes of tags, it’s important to escape all illegal XML characters that might break the validity of the XML. This can be easily done in C# using the Escape method.
Get Letters Of The Alphabet
Get the alphabet by looping through the ASCII values 65 to 90, which correspond to uppercase A through Z.
Validate phone number using RegEx and Java
Java example of how to validate a phone number in various formats using regular expressions. Contextual Ads More Java Resources Advertisement
Validate DateTime Format
Test a C# date and time as a valid DateTime object format through error handling.
Validate Value As Numeric
Test passed values to see if they are numeric or not using the TryParse method on the Double data type.
Find Controls In MasterPages Recursively
A useful piece of code that enhances the search for the control with the specified name under the passed parent control.
Function to test for primality
A simple modulus based algorithm used in Java to find if the passed number is prime or not.
Validating credit card numbers
This JavaScript function checks a text field for a valid credit card number through several validation methods.