如何在ASP.NET中从C#显示警报框? [英] How to display an alert box from C# in ASP.NET?

查看:76
本文介绍了如何在ASP.NET中从C#显示警报框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用详细视图,并且想在我的代码块末尾显示一个警告框,该警告框显示:

I am using a detail-view and would like to display an alert-box at the end of my code block that says:


谢谢!您的数据已成功插入。

Thank you! Your data has been inserted successfully.

是否有一种简单的方法可以从 C# ASP.NET 网页后面有c $ c>代码?

Is there a simple way to do this from the C# code behind of my ASP.NET web pages?

推荐答案

插入代码后,

ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Record Inserted Successfully')", true);

这篇关于如何在ASP.NET中从C#显示警报框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆