Programming
Try Catch Statements for Error Handling in Asp.Net & C#
Error handling in Classic ASP was not the best. ASP.NET has a new error handling mechanism which was already in other languages such as C, C++ and JAVA. It is called the try...catch mechanism, which is also known as "Exception Handling".
This article provides insight about exception handling on the basis of ASP.NET and C# as code behind.
Send Email Attachments from a Form using Asp.Net and C#
In order to send email attachements from a form, we first upload the file to a temporary location on the server. We then attach the file to the email message, execute the mail message to sent he email and finally delete the file from the temporary location.
Please follow the following steps to add attchment funtionality to you Asp.Net form using C#.
Create a Checkbox List Web Control Using Asp.Net & C#
The CheckBoxList control creates a multiselection check box group. To specify items that you want to appear in the CheckBoxList control, place a ListItem element for each entry between the opening and closing tags of the CheckBoxList control. The CheckBoxList control can be dynamically generated using data binding as well.
Add an Automatic / Dynamic Copyrighted Year Message in PHP
Instead of manually updating the copyrighted message every year, you can add a dynamic and automatic copyrighted year message at the bottom of your website. To do so, include the following code at the bottom of your php files just before the body tag.
<?
$year= date('Y');
echo("Copyrighted ©$year W3courses.com");
?>
Printing Hello World and Numbers From 1 to 11 in C Programming
The following code prints hello world and numbers from 1 to 11
Source Code for Math Functions Sin Cos Tan ArcTan Absolute Value in C Programming
Following is the source code for math functions Absolute Value, Sin, Cos, Tan, and ArcTan:
#include <math.h>
main()
{
printf("%d %d\n",abs(-4),abs(5));
printf("%f %f %f\n",sin(1/6.0*M_PI),cos(1/6.0*M_PI),tan(1/6.0*M_PI));
printf("%f\n",atan(0.5)*180/M_PI);
}
Source Code for Math Functions Log10 Floor Round Power Square Root in C Programming
Following is the source code for math functions Log10, Floor, Round, Power, and Square Root:
#include <math.h>
main()
{
printf("%f %f\n",log10(64)/log10(2),pow(32,0.2));
printf("%f %f\n",floor(6.6),rint(6.6));
printf("%f\n",pow(12,3));
printf("%f\n",sqrt(25));
}
Source Code for Calculating Factorial of a Number using a For Loop in C Programming
Following is the source code for calculating the factorial of a number using a For Loop in C Programming.
VBA Code to Call Windows API File Open Dialog Box in Microsoft Access
The code below calls the windows API File Open dialog box and when a user selects a file the function returns the file path.
Option Compare Database
Option Explicit
Php Mail Function with Html Header
I recenltly used the php mail function. Simple but useful.
