pallavikotturu / HW8

homework 8
0 stars 0 forks source link

Login.aspx.cs #8

Open pallavikotturu opened 7 years ago

pallavikotturu commented 7 years ago

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;

namespace Kotturu2 { public partial class Login : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { lblError.Visible = false; }

    protected void btnLogin_Click(object sender, EventArgs e)
    {
        if ((String.IsNullOrEmpty(txtAccessNet.Text))|| (String.IsNullOrEmpty(txtPassword.Text)))
        {
            lblError.Visible = true;
        }
        else if(!((String.IsNullOrEmpty(txtPassword.Text))&&(String.IsNullOrEmpty(txtAccessNet.Text))))
        {
            Response.Redirect("Home.aspx");
        }
    }
}

}

pallavikotturu commented 7 years ago

`//PALLAVI KOTTURU; CAPSTONE 1; DR. PAYTON; I RECIEVED AN EXTENSION FOR THIS ASSIGNMENT

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;

namespace Kotturu2 { public partial class Login : System.Web.UI.Page { ///

    /// on the page load, there is no error that is shown
    /// </summary>

    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        lblError.Visible = false;
    }
    /// <summary>
    /// upon the login button click, if either the login or password textboxes are empty, then the error label will be displayed
    /// otherwise, the site will display the home page.
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        if ((String.IsNullOrEmpty(txtAccessNet.Text))|| (String.IsNullOrEmpty(txtPassword.Text)))
        {
            lblError.Visible = true;
        }
        else if(!((String.IsNullOrEmpty(txtPassword.Text))&&(String.IsNullOrEmpty(txtAccessNet.Text))))
        {
            Response.Redirect("Home.aspx");
        }
    }
}

}`