Imports BVSoftware.BVC.Core Imports System.IO Public Class PluginOrders Inherits BaseAdminPage Protected WithEvents MetaDescriptionControl As BVSoftware.WebControls.MetaTag Protected WithEvents MetaKeywordsControl As BVSoftware.WebControls.MetaTag #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. Private Sub InitializeComponent() End Sub Protected WithEvents plugin1 As System.Web.UI.WebControls.PlaceHolder '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 BVC2004Store.CheckThisPage(Security.RolePermission.LoginToAdmin) BVC2004Store.CheckThisPage(Security.RolePermission.AccessOrderArea) If Not Page.IsPostBack Then MetaKeywordsControl.Content = WebAppSettings.MetaKeywords MetaDescriptionControl.Content = WebAppSettings.MetaDescription End If LoadPlugin() End Sub Private Sub LoadPlugin() Dim pluginName As String = "" If Not Request.Params("module") Is Nothing Then pluginName = Request.Params("module") End If Dim pluginFolder As String = "plugins\admin\orders" Dim fullFolder As String = Path.Combine(Request.PhysicalApplicationPath, pluginFolder) If Directory.Exists(fullFolder) Then If File.Exists(Path.Combine(fullFolder, pluginName)) Then Dim virtualPath As String = "~/" & pluginFolder.Replace("\", "/") & "/" & pluginName Dim plugin As UserControl = LoadControl(virtualPath) If Not plugin Is Nothing Then Me.plugin1.Controls.Clear() Me.plugin1.Controls.Add(plugin) End If End If End If End Sub End Class