JavaScript运行时错误:'RefreshImageVerifier'未定义

时间:2016-07-26 11:20:50

标签: asp.net vb.net

我在向导步骤2的oUpWizStep2更新面板中有一个图像验证程序。我想通过Page_PreRender刷新图像但我得到JavaScript运行时错误:'RefreshImageVerifier'未定义。在没有向导步骤的情况下,它在其他页面中工作正常。

我的代码

Private Sub Page_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender
    If Wizard1.ActiveStepIndex = 1 Then
        Dim oUp As UpdatePanel = TryCast(Wizard1.FindControl("oUpWizStep2"), UpdatePanel)
        Dim imgVerifier As ImageVerifier = CType(Wizard1.FindControl("ImgVerifierS2"), ImageVerifier)
        ' ## Refresh the verification code on call back.
        ScriptManager.RegisterStartupScript(oUpWizStep2, oUpWizStep2.GetType, "scriptname", "RefreshImageVerifier('" & imgVerifier.ClientID & "','ImageVerifier.axd?uid=" & imgVerifier.MyUniqueID & "');", True)
    End If

End Sub

0 个答案:

没有答案