news.aspx.vb

来自「C#语言制作asp.net网上商店的」· VB 代码 · 共 40 行

VB
40
字号

Partial Class Admin_Management_News
    Inherits System.Web.UI.Page
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim mode As String = Request("mode")
        LoadCartControl(mode)

    End Sub


    Private Sub LoadCartControl(ByVal mode As String)

        If IsNothing(mode) Then mode = "newscategory"

        Dim uc As UserControl = Nothing
        Select Case mode.ToLower
            Case "newscategory"
                uc = CType(LoadControl("Controls/NewsCategoryControl.ascx"), UserControl)
            Case "news"
                uc = CType(LoadControl("Controls/NewsControl.ascx"), UserControl)
            Case "subscriptions"
            Case "editnews"
                uc = CType(LoadControl("Controls/EditNewsControl.ascx"), UserControl)
            Case "editnewscategory"
                uc = CType(LoadControl("Controls/EditNewsCategoryControl.ascx"), UserControl)
            Case Else
                uc = CType(LoadControl("Controls/NewsCategoryControl.ascx"), UserControl)
        End Select

        phNews.Controls.Clear()
        phNews.Controls.Add(uc)



    End Sub


End Class

⌨️ 快捷键说明

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