 
			
				13/03/2007, 12:04
			
			
			     |  
      |    |    |    Fecha de Ingreso: agosto-2006  Ubicación: en lima peru  
						Mensajes: 184
					  Antigüedad: 19 años, 2 meses Puntos: 0     |        |  
  |      Re: Mostrar una parte u otras        DEBES DE HACER LAS 2 COSAS UNA BD CON USUARIOS Y  ADMINISTRARLOS EN EL WEB CONFIG.   
COMO POR EJEMPLO EN EL WEB CONFIG   
<authentication mode="Forms"> 
        <forms name="Mantenimiento" loginUrl="IniciarSesion.aspx" protection="All"  path="/" defaultUrl="Privado\Mantenimiento"> 
          <credentials passwordFormat="Clear"> 
            <user name="admin" password="admin"/> 
          </credentials> 
        </forms> 
      </authentication>  
    <authorization> 
      <deny users="?"/> 
      <allow users="*"/> 
    </authorization>     
EN TU WEBFORM   
    Protected Sub btnin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnin.Click   
        Try 
            var.cn.Open() 
            Dim tabla As DataSet = var.ListarDatos("VerificarCorreo", txtnick.Text) 
            var.cn.Close() 
            If tabla.Tables(0).Rows.Count > 0 Then 
                Dim s As String = UCase(var.UnEncryptStr(tabla.Tables(0).Rows(0).Ite  m(5), 12)) 
                If s = UCase(txtpass.Text) Then   
                    Session("id") = tabla.Tables(0).Rows(0).Item(0) 
                    Session("no") = tabla.Tables(0).Rows(0).Item(1) 
                    Session("ap") = tabla.Tables(0).Rows(0).Item(2) 
                    Session("ni") = tabla.Tables(0).Rows(0).Item(3) 
                    Session("em") = tabla.Tables(0).Rows(0).Item(4) 
                    Session("pas") = txtpass.Text 
                     FormsAuthentication.RedirectFromLoginPage("ADMIN", True) 
                     Response.Redirect("privado\mantenimiento.ASPX") 
 'aca si el usuario esta en  tu bd pues envialo a una pagina protegida   
                    lblmensaje.Text = "Bienvenido " & txtnick.Text           
                End If 
            Else 
                lblmensaje.Text = "Usuario no registrado" 
                If MsgBox("Lo sentimos no estas Registrado / Deseas Registrarte", MsgBoxStyle.YesNo, "Atención") = MsgBoxResult.Yes Then 
                    Response.Redirect("Registrar.Aspx") 
                Else 
                    Response.Redirect("Default.Aspx") 
                End If   
            End If   
            Session("contador") = CInt(Session("contador")) + 1 
            If Session("contador") = 3 Then 
                'cerrar 
            End If 
        Catch ex As Exception   
        End Try 
    End Sub           |