Using sessions for protecting web files to be accessed if the user is logged or not . useful or not?
<p>I have a login page and a global page where the user is redirected to after he logged in.</p>

<p>I need to know if this is a good method for protecting some web files to be accessed if the user is not logged in.</p>

<p><code>global.aspx</code> code (the protected page where the user is redirected after he logged in)</p>

<pre><code>    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Login"] != null)
        {
            if (Session["Login"].Equals("Logged"))
            {
                userName.Text = (string)Session["UserTest"].ToString();
            }
        }
        else
            Response.Redirect("http://localhost:port/Login.aspx");
    }
</code></pre>

<p>Login page code:</p>

<pre><code>Session["Login"] = "Logged";
Session["UserTest"] = "Test123";
Response.Redirect("http://localhost:port/Global.aspx");
</code></pre>

<p>Thanks</p>
