Sei sulla pagina 1di 1

CDIGOS LOGIN

BASE DE DATOS
create database login
use login
create table usuarios(
nombre varchar(30),
password varchar(30),
)

insert into usuarios values('juan','123')

select*from usuarios

create procedure consulta


@usu varchar(30),
@pas varchar(30)
as
begin
select nombre from usuarios where @usu=nombre and @pas=password;
end;

drop table usuarios

BOTN ACEPTAR:
Dim numero As Integer

Dim dvSql As
DataView=DirectCast(SqlDataSource1.Select(DataSourceSelectArguments.Empty),DataVi
ew)

if dvSql.Count > 0 then


numero=1
End if

if numero=1 then
Session("usuarios")=dvSql(0).Item(0)
Response.Redirect("pagina2.aspx")
end if

PGINA 2:
Label1.Text = Session("usuarios")

Potrebbero piacerti anche