Created
February 4, 2020 13:38
-
-
Save tonnguyen/e925109c9ea4632b1051fea00586d915 to your computer and use it in GitHub Desktop.
WebForms panel in L7.4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SamplePanel.ascx.cs" Inherits="Litium.Accelerator.Mvc.Site.ECommerce.Panels.SamplePanel" %> | |
<h1 runat="server" id="Heading"></h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Litium.Accelerator.Mvc.Site.ECommerce.Panels | |
{ | |
public partial class SamplePanel : System.Web.UI.UserControl | |
{ | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
Heading.InnerText = "Hello world " + Guid.NewGuid().ToString("N"); | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Litium.Foundation.Modules.ECommerce; | |
using Litium.Web.Administration.Panels; | |
namespace Litium.Accelerator.Mvc.Site.ECommerce.Panels | |
{ | |
/// <summary> | |
/// Defines panel definition, to display it in EcommerceArea. | |
/// </summary> | |
public class SamplePanelDefinition : PanelDefinitionBase<EcommerceArea, SamplePanelDefinition.SettingsModel> | |
{ | |
/// <summary> | |
/// Points to the path of SamplePanelPage.aspx | |
/// </summary> | |
public override string Url => "https://localhost/Site/ECommerce/Panels/SamplePanelPage.aspx"; | |
public override string ComponentName => null; | |
public override bool PermissionCheck() | |
{ | |
return true; | |
} | |
public class SettingsModel : IPanelSettings | |
{ | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SamplePanelPage.aspx.cs" Inherits="Litium.Accelerator.Mvc.Site.ECommerce.Panels.SamplePanelPage" %> | |
<%@ Register src="SamplePanel.ascx" tagname="SamplePanel" tagprefix="uc1" %> | |
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title></title> | |
</head> | |
<body> | |
<form id="form1" runat="server"> | |
<%-- Render panel's web user control --%> | |
<uc1:SamplePanel ID="SamplePanel1" runat="server" /> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment