Last active
August 29, 2015 14:03
-
-
Save sachatrauwaen/94766e406e05671a643c to your computer and use it in GitHub Desktop.
This file contains 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" CodeFile="MyConfigurator.ascx.cs" Inherits="Providers_TokenProviders_My_MyConfigurator" %> | |
<div class="dnnFormItem"> | |
<asp:label id="lblField" runat="server" text="Parameter" helptext="Enter a value" | |
controlname="tbParameter" CssClass="dnnLabel" /> | |
<asp:TextBox ID="tbParameter" runat="server"></asp:TextBox> | |
</div> |
This file contains 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 Satrabel.OpenBlocks.Token; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.UI; | |
using System.Web.UI.WebControls; | |
public partial class Providers_TokenProviders_My_MyConfigurator : TokenConfigurator | |
{ | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
} | |
public override void LoadSettings(System.Collections.Hashtable settings) | |
{ | |
try | |
{ | |
tbParameter.Text = (string)settings["parameter"]; | |
} | |
catch (Exception) | |
{ | |
} | |
} | |
public override System.Collections.Hashtable SaveSettings() | |
{ | |
Hashtable settings = new Hashtable(); | |
settings["parameter"] = tbParameter.Text; | |
return settings; | |
} | |
public override string getToken() | |
{ | |
return "{{my parameter=\""+tbParameter.Text+"\" }}"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment