So far to do a login using a database to verify it, what it did was that with javascript
validate the form information,
to then send the data, which through php, to a query to the database, which will corroborate the data entered by the user, with those stored in the database.
But now using ASP
, I created a login using the toolbox that creates objects <asp:button>
and elements of this style with c#
, then I created the connection to the database, to pick up the answer from the query to the database, and finally, I verified that the data in the database were the same as those entered by the user in the login.
The code I used is something similar to this:
Usuario usu1=new Usuario();
//el email y el password serian los 2 textbox que he creado para que el cliente introduzca los datos
if (usu1.Login==this.Email.Text&&usu1.Password==this.Password.Text){
//y ahora el codigo que nos llevaria a la pagina web de los usuarios correctos
}
And my question is:
When using ASP
I did not need to use javascript
for anything, since I did everything with c#
. This would be well done ?, since it works correctly and if it is well done as it is that I do not need to use javascript
?
Since I understand that javascript
is to program in the client and c#
would be a language to program in the server.