且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

提示或小弹出窗口

更新时间:2023-12-04 09:52:04

,您可以使用response.redirect(< script> alert(``您的文字在这里'')</script>")

或者,您可以使用RegisterClientScriptBlock("key",< script> alert(``您的文本在这里'')</script>")

两者是相等的,但有时是response.redirect可以通过单击确定"来更改页面的呈现方式.
我建议第二种选择.

您也可以使用conirm而不是alert.这将使用户可以选择单击(确定并取消)
根据您可以执行的其他操作(例如,单击确定"),您可能希望重定向到更新的页面,就像在Facebook通知中一样.
you can either use response.redirect("<script>alert(''Your text goes here'')</script>")

Or you can use RegisterClientScriptBlock("key","<script>alert(''Your text goes here'')</script>")

both are equal but sometimes response.redirect changes the way the page is rendered on clicking ok.
I would suggest the second option.

you could also use conirm instead of alert.this would give the user the option to click (ok and cancel)
Depending on which you could perform further action like clicking on ok you might like to redirect to the updated page like it happens on facebook notification.


请尝试以下链接...

像消息框一样的Gmail内部聊天 [
Try below link...

Gmail Internal Chat Like Message Box[^]