Creating Repository pattern in ASP.net MVC

In this article, I will help you to understand how to create a Repository Pattern that is mainly used for large enterprise application. The Repository pattern divides the application’s UI, components of data access and business logic into several layers which are easy to test and maintain. A Employees application will be created which will... » read more

Send SMTP email in ASP.NET

Here is an example of sending an email in ASP.NET using the SMTP server. First, add the namespace. using System.Web.Mail; And the function. C# private bool SendMail(String SendTo, String sendToCC, string SendFrom, string Subject, string msg) { bool bSuccess; try { MailMessage mail = new MailMessage(); mail.To = SendTo; mail.Cc = sendToCC; // to send... » read more

RowDataBound Event in GridView in ASP.NET

GridView.RowDataBound is an event in GridView controls in ASP.NET. It occurs when a data row is bound to data in the GridView. Below are examples of how to use this even when binding data to the GridView using C# and VB.NET. First, let’s create a Visual Studio ASP.NET Application C#. Note: We will show the code... » read more