asp.Netポップアップ警告ウィンドウ実装コード
685 ワード
///
/// “ ”“ ” , , url1, url2
///
///
/// “ ”
/// “ ”
public static void confirm(string strMsg, string url1, string url2)
{
Page page = HttpContext.Current.Handler as Page;
page.ClientScript.RegisterStartupScript(page.GetType(), "message", "var result = window.confirm('" + strMsg + "');if(result){window.location='" + url1 + "'}else{window.location='" + url2 + "'};",true);
return;
}