Introduction to ASP.NET MVC

What is MVC? MVC is a framework methodology. It divides an application’s implementation into three component roles: models, views, and controllers. The Model represents the application core (for instance a list of database records). The View displays the data (the database records). The Controller handles the input. For example: If you request a page, first controller

Read More

A Simple Demonstration with ASP.net GridView

GridView is a powerful control of ASP.net. Here I tried to demonstrate gridview with a simple project. I have stored employee information then displayed it in gridview and insert, update and delete employee information. Step 1: Create a table name hrm_employee and insert some sample data in it. –Create Table : hrm_employee— CREATE TABLE hrm_employee

Read More

How to send email in ASP.net

ou have to configure SMTP server before sending email from your server. Hope you already know how to configure smtp server. Here is the simple code segment for sending email against a button click. protected void btnSendMail_Click(object sender, EventArgs e) { SmtpClient smtpClient = new SmtpClient(); MailAddress fromAddress = new MailAddress(“mahedee_hasan@leads-bd.com”); //Sender email address MailMessage

Read More

ASP.NET Membership Step by Step

ASP.NET provides build in control to validate and store user credential. So, membership helps to manage user authentication and authorization in website. The membership provider is the glue between Login controls and membership database. Step 1: Implementing the Membership and Role Provider Suppose we are going to create a website by Visual Studio 2010. If

Read More

How to register .NET framework in IIS

If you install IIS after installing framework, you have to register framework in IIS. Otherwise you will get following message after hosting asp.net application in IIS. ASP.NET 4.5 has not been registered on the Web server. You need to manually configure your Web server for ASP.NET 4.5 in order for your site to run correctly.

Read More

Call JavaScript from Asp.net code behind

Suppose you want to display confirmation message by javascript from asp.net code behind after saving data. Write the following code in your button event. protected void btnSaved_Click(object sender, EventArgs e) { string msg = “Data saved sucessfully”; Page.ClientScript.RegisterStartupScript(this.GetType(), “Alert”, “

HTTP Error 404.3

Did you find the error “HTTP Error 404.3” ? Yes, I found the error at the time of deploying my ASP.NET web application to IIS 7. I found the following error (screen shot). To solve the error follow the following steps: Step 1: Go to Control Panel -> Programs and Features -> Turn Windows

Read More