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.
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#.
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.
The following code will replace a character or a word with some other character or a word. This is accomplished by the replace function in C#.
strReplace = "This is a test string.";
strReplace = Regex.Replace(strReplace, " is", " was");