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

📄 browselisting.aspx.vb

📁 网络营销系统.net版.rar
💻 VB
字号:
Public Class BrowseListing
    Inherits System.Web.UI.Page
    Protected WithEvents lblUserName As System.Web.UI.WebControls.Label
    Protected WithEvents myItems As System.Web.UI.WebControls.DataGrid
    Protected WithEvents lblMsg As System.Web.UI.WebControls.Label
    Protected WithEvents Table1 As System.Web.UI.WebControls.Table
    Protected WithEvents lblStatus As System.Web.UI.WebControls.Label
    Protected GuestMenu As System.Web.UI.WebControls.Panel
    Protected RegisteredMenu As System.Web.UI.WebControls.Panel

#Region " Web Form Designer Generated Code "

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

    End Sub

    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

        If Not Page.IsPostBack Then

            BindGrid()

            ' show the appropriate menu
            If Tools.IsLoggedIn() Then
                lblUserName.Text = "Welcome <b>" & Request.Cookies("email").Value & "</b><br /><br />"
                GuestMenu.Visible = False
                RegisteredMenu.Visible = True
            Else
                lblUserName.Text = "Welcome guest<br /><br />"
                GuestMenu.Visible = True
                RegisteredMenu.Visible = False
            End If
        End If

    End Sub

    Private Sub BindGrid()

        Dim objItemList As Bid.Item = New Bid.Item()

        myItems.DataSource = objItemList.ViewItemsForSale()
        myItems.DataBind()

    End Sub

    Public Function FormatURL(ByVal intID As Integer, ByVal strName As String, ByVal strDesc As String)

        ' if not logged in, use a blank URL (this has the effect of turning the hyperlink into a label)
        ' as we don't want guests to be able to select items until they have logged in
        If Tools.IsLoggedIn() Then
            Return "BidItem.aspx?itemid=" & CStr(intID) & "&itemname=" & _
                   Server.UrlEncode(strName) & "&itemdesc=" & Server.UrlEncode(strDesc)
        Else
            Return ""
        End If

    End Function

End Class

⌨️ 快捷键说明

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