.aspx で呼び出す必要がある関数があり、その関数は次のようにタグに含まれています。問題は、.cs クラスでプロパティを評価する必要があることです。どうすればこれを達成できるでしょうか。
<script type="text/javascript">
function Redirect() {
location.href = "homePage.aspx";
}
</script>
<script runat="server">
protected void Button1_Click(Object sender, EventArgs e)
{
if (something is true from the propties set in .cs)
{
Page.ClientScript.RegisterStartupScript(this.GetType(),
"ConfirmBox", "if(confirm('The numbers selected are not in the directory, you wish to continue?') == true){Redirect();};", true);
}
}
</script>