本文介绍了显示来自vbcode的消息框不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下代码,并且需要确认弹出框来显示何时存在某种特定条件.


这是代码:


I have the following code and need a confirm popup box to show when a certain condition exists.


Here is the code:


Protected Sub InvestigationStatusDDLIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) ' Root Cause
    Dim script As ClientScriptManager = Page.ClientScript
    If ddlImplementationStatus.SelectedValue = "Completed" And ddlInvestigationStatus.SelectedValue <> "Completed" Then
        If Session("seesionShow") = "yes" Then
            If Not script.IsClientScriptBlockRegistered(Me.[GetType](), "SubmitScript") Then
                script.RegisterOnSubmitStatement(Me.[GetType](), "SubmitScript", "return confirm(This will reset dates, Proceed?, NOTE all dates will be cleared!)")
            End If
        End If
    End If



End Sub




以上无效.我只能在页面加载事件中使它起作用,而不能从下拉列表中选择的索引更改事件中起作用.




The above doesn''t work. I can get it only to work from the page load event, but not from the dropdownlist selected index change event.

推荐答案


这篇关于显示来自vbcode的消息框不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-13 17:05