?
let me share the code I'm using... if someone can help me on this issue

login.aspx (file)

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs"
Inherits="WABiblioteca.Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

<html xmlns="http://www.w3.org/1999/xhtml"; >
<head runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript">

      function pageLoad() {
      }

    </script>
    <style type="text/css">
        #form1
        {
            text-align: center;
        }
        .style1
        {
            font-family: Arial, Helvetica, sans-serif;
            font-size: small;
            font-weight: bold;
        }
        .style2
        {
            font-family: Arial, Helvetica, sans-serif;
            font-size: x-small;
        }
    </style>
</head>
<body bgcolor="#ffffcc">
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
    </div>
    <p class="style1">
        Login</p>
        <asp:Login ID="Login1" runat="server" BackColor="#F7F7DE"
BorderColor="#CCCC99"
            BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana"
        Font-Size="10pt" DestinationPageUrl="~/Default.aspx">
            <TitleTextStyle BackColor="#6B696B" Font-Bold="True"
ForeColor="#FFFFFF" />
        </asp:Login>
    <br />
</body>
</html>

----------------

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace WABiblioteca
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}

-----------

This is the form where I want to check if the user has permission to access:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
Inherits="WABiblioteca._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

<html xmlns="http://www.w3.org/1999/xhtml"; >
<head runat="server">
    <title>Page</title>
    <style type="text/css">
        .style2
        {
            font-family: Arial, Helvetica, sans-serif;
            font-size: medium;
            text-align: center;
        }
    </style>
</head>
<body style="text-align: center">
    <form id="form1" runat="server">
    <div title="Biblioteca Pessoal">

    </div>
    <asp:Image ID="Image1" runat="server" Height="160px"
        ImageUrl="~/biblioteca.jpg" Width="800px" />
    <p class="style2">
        <asp:Button ID="btLivros" runat="server"
PostBackUrl="~/Livros.aspx"
            Text="Livros" />
&nbsp;&nbsp;
        <asp:Button ID="btResenhas" runat="server"
PostBackUrl="~/Resenhas.aspx"
            Text="Resenhas" />
&nbsp;&nbsp;
        <asp:Button ID="btCategorias" runat="server"
PostBackUrl="~/Categorias.aspx"
            Text="Categorias" />
&nbsp;&nbsp;
        <asp:Button ID="btCapas" runat="server" Text="Capas" />
&nbsp;&nbsp;
        <asp:Button ID="btUsuarios" runat="server" Text="Usuários" />
    </p>

    </form>
</body>
</html>

Reply via email to