30 lines
748 B
C#
30 lines
748 B
C#
using System;
|
|
using System.Web.Security;
|
|
using System.Web.UI;
|
|
|
|
namespace FWA_MAIN
|
|
{
|
|
public partial class login : Page
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
protected void LoginButton_Click(object sender, EventArgs e)
|
|
{
|
|
string username = Username.Text;
|
|
string password = Password.Text;
|
|
|
|
// Example authentication; replace with actual logic
|
|
if (username == "admin" && password == "someonerandom")
|
|
{
|
|
FormsAuthentication.RedirectFromLoginPage(username, false);
|
|
}
|
|
else
|
|
{
|
|
// Show an error message or handle invalid login
|
|
}
|
|
}
|
|
}
|
|
} |