📄 browselisting.aspx.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 Form1 As System.Web.UI.HtmlControls.HtmlForm
Protected WithEvents lblStatus As System.Web.UI.WebControls.Label
#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 = "欢迎您 <b>" & Request.Cookies("email").Value & "</b><br /><br />"
Else
lblUserName.Text = "Welcome guest<br /><br />"
End If
End If
End Sub
Private Sub BindGrid()
Dim objItemList As C2CSystem.Item = New C2CSystem.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 + -