⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defaultvb.aspx.vb

📁 Telerik是很大的第三方软件制造商
💻 VB
字号:
Namespace Telerik.UploadExamplesVBNet.SingleAndMultipleFiles

    Public Class DefaultVB
        Inherits Telerik.QuickStart.XhtmlPage

#Region " Web Form Designer Generated Code "

        'This call is required by the Web Form Designer.
        <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

        End Sub
        Protected WithEvents singleUpload As Telerik.WebControls.RadUpload
        Protected WithEvents lblSingleUploadNoResults As System.Web.UI.WebControls.Label
        Protected WithEvents ltSingleUploadFileName As System.Web.UI.WebControls.Literal
        Protected WithEvents ltSingleUploadFileSize As System.Web.UI.WebControls.Literal
        Protected WithEvents panelSingleUploadLabelContainer As System.Web.UI.WebControls.Panel
        Protected WithEvents multipleUpload As Telerik.WebControls.RadUpload
        Protected WithEvents lblMultipleUploadNoResults As System.Web.UI.WebControls.Label
        Protected WithEvents rptMultipleUploadResults As System.Web.UI.WebControls.Repeater
        Protected WithEvents progressArea1 As Telerik.WebControls.RadUploadProgressArea
        Protected WithEvents btnSubmit As System.Web.UI.WebControls.Button

        'NOTE: The following placeholder declaration is required by the Web Form Designer.
        'Do not delete or move it.
        Private designerPlaceholderDeclaration As System.Object

        Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
            'CODEGEN: This method call is required by the Web Form Designer
            'Do not modify it using the code editor.
            InitializeComponent()
        End Sub

#End Region

        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            'Put user code to initialize the page here
        End Sub
        Private Sub BindResults()
            Dim singleResultExist As Boolean = singleUpload.UploadedFiles.Count > 0 And Not progressArea1.RequestCancelled
            lblSingleUploadNoResults.Visible = Not singleResultExist
            panelSingleUploadLabelContainer.Visible = singleResultExist
            ltSingleUploadFileName.Visible = singleResultExist
            ltSingleUploadFileSize.Visible = singleResultExist
            If singleResultExist Then
                ltSingleUploadFileName.Text = singleUpload.UploadedFiles(0).FileName
                ltSingleUploadFileSize.Text = "(" + singleUpload.UploadedFiles(0).ContentLength.ToString() + " Bytes)"
            End If

            Dim multipleResultsExist As Boolean = multipleUpload.UploadedFiles.Count > 0 And Not progressArea1.RequestCancelled
            lblMultipleUploadNoResults.Visible = Not multipleResultsExist
            rptMultipleUploadResults.Visible = multipleResultsExist
            If multipleResultsExist Then
                rptMultipleUploadResults.DataSource = multipleUpload.UploadedFiles
                rptMultipleUploadResults.DataBind()
            End If
        End Sub
        Private Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
            BindResults()
        End Sub
    End Class

End Namespace

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -