Skip to main content

Posts

Showing posts with the label HTML

A Beginner's Tutorial for Understanding Windows Communication Foundation (WCF)

In this article, we will create a WCF service. Firstly, we will discuss some basics understanding of WCF services. Basics of WCF services WCF Services can be used to communicate with different type of applications using different protocols. if we want to use the WCF services we will have the basic understanding of its main components which is called ABC. Let's discuss these main components of WCF services one by one. Address A WCF provides a URI which can be used to locate the WCF services. This URI called the address of the WCF service. Binding Once we are able to locate the WCF service , The  next point is how to communicate with WCF service like which protocol will be used to communicate. the binding which defines how the WCF service handle this communication, it also defines other communication parameters like message encoding Contract The contract defines  what public data and inter...

How to send Email through ASP.NET in C#

Sending Email through ASP.NET is very easy.the .NET framework comes with a namespace which is uses for handling the Email.The namespace is:                                                            System.Net.Mail namespace Here i am using the two classes of the above mentioned namespace.The first class is MailMessage  class which is used for actual email and second is SmtpClient class which is for sending Email. Write the following code into the page load event: try { MailMessage mailMessage = new MailMessage(); mailMessage.To.Add( " test@domain.com " ); mailMessage.From = new MailAddress( " test2 @ domain.com " ); mailMessage.Subject = " Test Email " ; mailMessage.Body = " This is an ASP.NET test E-mail! " ; SmtpClient smtpClient = new SmtpClient( " smtp .te...