protected void LoginCheck()
{
if (Session["Login_Status"] == null || Session["Login_Status"] == "false")
{
MessageBoxShow("Please Login!");
}
}
protected void Button1_Click(object sender, EventArgs e)
{
LoginCheck();
Session.RemoveAll();
Button1.PostBackUrl = "~/Default.aspx";
Response.Redirect("~/Default.aspx");
}
処理しない方法
Session.RemoveAll();
Button1.PostBackUrl = "~/Default.aspx";
Response.Redirect("~/Default.aspx");
ログインがfalseの場合
if(LoginCheck()){}の条件を使用しないようにこのプログラムをコーディングするにはどうすればよいですか。phpのように動作させたい: php exit; 機能?