点击按钮后,asp.net(vb.net)中的标签不显示

时间:2015-06-29 05:17:52

标签: asp.net vb.net

如果按钮提交已经输入,我会显示一个标签,即使让它显示为真,我的标签也不显示。

这是asp.net:

 <asp:Label ID="lblReportIsSaving" runat="server" Visible="False" >Report Is Saving In Progress</asp:Label>

 <asp:Button ID="btnRegister" runat="server" Height="22px" Text="Enter" Width="100px" />

这是我的vb.net,对于这件事,我想先在'Save&amp; amp;更新成功'弹出:

Protected Sub btnRegister_Click(sender As Object, e As EventArgs) Handles btnRegister.Click

        lblReportIsSaving.Visible = True

    Dim intSaveProject, intLastInsertID, intCompanyID As Integer

    strErrMessage = ""

    Try

        lblReportIsSaving.Visible = True

        _strTarget = Page.ResolveClientUrl("test.aspx")
        strPopUpScript = "<script type=""text/javascript"">"
        strPopUpScript = strPopUpScript + "window.location.replace('" & _strTarget & "');"
        strPopUpScript = strPopUpScript + "</script>"

        intSaveProject = fnSaveIntoProject(_strErrMessage)
        lblReportIsSaving.Visible = True

        intLastInsertID = _objCommonData.fnGetLastInsertUserID()

        If intSaveProject = 1 Then
            StringBusinessObject.Web.baseClass.fnAlert(Me.Page, "Save & Update Successful.")
            ClientScript.RegisterClientScriptBlock(Me.GetType(), "PopupScript", strPopUpScript)
        Else
            StringBusinessObject.Web.baseClass.fnAlert(Me.Page, "Save & Update Unsuccessful. " & strErrMessage)
        End If

        'btnRegister.Enabled = True

    Catch ex As Exception
        StringBusinessObject.Web.baseClass.fnAlert(Me.Page, ex.Message.ToString)
    End Try

End Sub

有人可以帮我这个吗?我只想在弹出窗口出现之前让标签可见。

0 个答案:

没有答案