私の C# コードでは、次のコードを使用して確認ボックスをユーザーに提示しました。
string confirmMsg = "All the cause data will be permanently removed. Are you sure you want to continue";
ClientScript.RegisterStartupScript(Page.GetType(), "TWCL Issue Mgmt System", "confirm('" + confirmMsg + "');", true);
与えられた答えに基づいて他のコードを実行できるように、ブール値またはその他の変数に答え (YES または No) を取得しようとしています。だから私はこのようなものが欲しい:
bool x = ClientScript.RegisterStartupScript(Page.GetType(), "TWCL Issue Mgmt System", "confirm('" + confirmMsg + "');", true);
if(x)
{
/*Exceute the rest of the code here*/
}
else
{
/*do postback*/
}
確認ボックスから YES/NO の答えを得る方法についてのアイデアはありますか?