gpt4 book ai didi

c# - 来自 asp.net 3.5 代码隐藏的警告框

转载 作者:太空宇宙 更新时间:2023-11-03 21:55:41 25 4
gpt4 key购买 nike

protected void ddlLanguage_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddlLanguage.SelectedValue=="es-ES")
{
Page page = HttpContext.Current.CurrentHandler as Page;

page.ClientScript.RegisterStartupScript(typeof(Page), "Script", "<script language='javascript'>alert('All content may not be in Spanish. Do you want to continue...');</script>");
}
}

我想做的只是显示一个简单的警告框,但一切都是徒劳的……什么都没有弹出。需要一些 ayudar。

最佳答案

也可以通过这种方式实现

protected void ddlLanguage_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddlLanguage.SelectedValue=="es-ES")
{
Response.Write("<script>alert('All content may not be in Spanish. Do you want to continue...');</script>");
}
}

关于c# - 来自 asp.net 3.5 代码隐藏的警告框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12409730/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com