显示来自母版页的警报消息 [英] Display alert Message from a MasterPage

查看:105
本文介绍了显示来自母版页的警报消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从母版页"弹出一条消息.有没有办法做到这一点?请帮忙.

我在MasterPage加载中有以下代码.因此,当时间过去时,将调用DisplayTaskAlarm,但永远不会显示MessageBox.

注意:MessageBox. DisplayAlertMessage是使用Javascript警报显示消息的自定义方法.它在网页上可以正常工作.

MasterPage_Load {

mpTimer =新Timer()
mpTimer.Interval = ConfigurationManager.AppSettings("TaskCheckInterval").Trim()
mpTimer.Enabled = True
AddHandler mpTimer.Elapsed,AddressOf DisplayTaskAlarm

I am trying to popup a message from the Masterpage.  Is there a way to do that?  Please help. 

I have below code in the MasterPage Load. So when the time elapses, DisplayTaskAlarm is being called, but MessageBox is never being displayed.

Note: MessageBox. DisplayAlertMessage is a custom method to display messages using Javascript alert. It works fine in webpages.

MasterPage_Load {

         mpTimer = New Timer()
        mpTimer.Interval = ConfigurationManager.AppSettings("TaskCheckInterval").Trim()
        mpTimer.Enabled = True
        AddHandler mpTimer.Elapsed, AddressOf DisplayTaskAlarm

私有子DisplayTaskAlarm(ByVal源作为对象,ByVal e作为ElapsedEventArgs)
MessageBox.DisplayAlertMessage(``我有一个任务要给你!'' .Page)
End End

推荐答案

感谢您的发帖!我建议您在一个MS论坛之一中发布您的问题,


首页ASP.NET论坛»常规ASP.NET »网络表单


位于此处: http://forums.asp.net/18.aspx .

祝您度过愉快的一天!


这篇关于显示来自母版页的警报消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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