SQL 2012 Hosting :: How To Create Change Password Form Or Page In ASP.NET Using SQL Server – Stored Procedure

Stored Procedure is a set of SQL commands that are named and stored in the server. Stored Procedure typically contains commands commonly associated with the database on the server, and generate a set of records. Stored Procedure written in the form of a script.
Stored Procedure database will improve performance, increase security database. Performasi enhanced through the use of local storage (local to the database), a program that has been compiled in advance, and use of the cache. Each time a command or Stored Procedure submitted to the server for processing, the server must determine whether sent to the server for processing, the server must determine whether the sender has the right to execute the order and whether the order is correct, after the rights and orders were correct, SQL Server will make the execution plan.

In this article you will learn how to create change password form and update the password, how to check credentials i.e. username and password from the Sql server database and how to use output parameter in stored procedure to return value.And how to get/read the return output in the code behind.

The concept is simple. We first need to check ┬áthe entered username and password against the database and if matched then the new password will overwrite the old password otherwise message will be displayed “Wrong Username/Password”.

First of all create a Sql server database and name it “MyDataBase”. Add dummy username e.g. admin and password e.g. demo. Then create a Stored Procedure to check existing username and password and change the password as:

In this stored procedure first the entered username and password will be checked from the database and if matched then the new password will overwrite the old password otherwise message will be displayed “Wrong Username/Password”. Now in the web.config file create the connection string to connect our asp.net web application with the Sql server database as.

In the <Form> tag of the design page(.aspx) design the page as:

C#.Net code to create Change password form/page. In the code behind file (.aspx.cs) write the following code on change pass word as:

VB.Net Code to create Change password form/page. In the code behind file (.aspx.vb) write the following code on change pass word as: