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

📄 view.aspx.vb

📁 Build words list automatic
💻 VB
字号:
Public Class view
    Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

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

    End Sub

    '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
    'view.aspx is mainly a "cloaking device" to disguise the real address of
    'downloadable files by using Server.Transfer to fetch them on behalf.
    'This enforces tracking of downloads, and also enables enforcement
    'of members-only downloads.
    'Typical use:  'view.aspx?target=flyinghouse.wmv"

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Querystring defines target, but we record stats first
        Dim sQ As String
        sQ = Request.QueryString("target")
        Dim XPageStats As New PageStats
        Try
            XPageStats.Open(Session("connDbControl"))
            'Standard handling code for all pages
            Call XPageStats.VisitorStats(Session, sQ _
            , Request.UserHostName, Request.UserHostAddress, Request.UserAgent)
            'All other handling, including error handling, and counter
            'is handled between XPageStats, Session and footer.aspx.vb
            XPageStats.Close()
        Catch ex As Exception
            'do nothing, this is an extra rather than the main purpose of this page
            XPageStats.Close()
        End Try

        Select Case LCase(Trim(Mid(sQ, InStrRev(sQ, "."))))
            Case "doc"
                Response.ContentType = "application/msword"
            Case "pdf"
                Response.ContentType = "application/pdf"
            Case ".rm"
                Response.ContentType = "application/vnd.rn-realmedia"
                'Response.ContentEncoding = ""
            Case ".wmv"
                Response.ContentType = "video/x-ms-wmv"
                'Other suggestions from http://www.webmaster-toolkit.com/mime-types.shtml
                'video/msvideo, video/x-msvideo
            Case ".mov"
                Response.ContentType = "video/quicktime"
        End Select
        '041227 JPC make fully config and adjust to different webserver siting
        Server.Transfer(Request.ApplicationPath & "/" _
        & ConfigurationSettings.AppSettings("cloakedDir") & "/" & sQ)
    End Sub

End Class

⌨️ 快捷键说明

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