ScriptManager.RegisterStartupScript未正确执行

时间:2014-09-22 20:45:24

标签: javascript asp.net ajax

在我的VB文件中,我有一些代码(我只会发布相关的部分,因为那里有很多代码)我试图执行一些JavaScript,所以我使用的是ScriptManager。的RegisterStartupScript。问题是脚本没有被执行,直到我远远超过我拥有它的行

If CmbRecordType.SelectedValue <> 37 Then
      'Xstuff to do
            Else
                'scriptstring = "Your File has been Received and will be processed soon.  Please reference your File ID #" & FileID & " if you need to contact support for any reason regarding this file."
                'RadWindowManager1.RadAlert(scriptstring, 330, 180, Title, Nothing)

                BtnCreateFileRecID.Visible = True

                Label3.Visible = False
                Image2.Visible = False

                scriptstring = "radalert('Your File has been Received and will be processed soon.  Please reference your File ID #" & FileID & " if you need to contact support for any reason regarding this file.', 330, 180);"
                ScriptManager.RegisterStartupScript(Me, Me.GetType(), "Accepted File", scriptstring, True)
            End If

在执行此脚本之前,它会直接跳转到下一个If语句,为什么会有任何想法?

0 个答案:

没有答案