Create the widget template
Create the markup for displaying the settings. The settings render a dropdown with choices for the user.
To do this, perform the following:
- Open your project in Visual studio.
- Create a file and name it
MyCustomSettings.ascx - Inside paste the following code:
ASP.NET
<%@ Control Language="C#" %> <%@ Register Namespace="Telerik.Sitefinity.Web.UI.Fields" TagPrefix="sitefinity" Assembly="Telerik.Sitefinity" %> <h2> <asp:Literal runat="server" ID="lGeneralSettings" Text="Custom Basic Settings" /> </h2> <sitefinity:ChoiceField ID="randomVariable" runat="server" DisplayMode="Write" DataFieldName="RandomVariable" Title="Random Variable" CssClass="sfSettingsSection" RenderChoicesAs="DropDown" />
Want to learn more?
Enhance your Sitefinity skills by enrolling in free training sessions. Become Sitefinity certified through Progress Education Community to strengthen your professional credentials.
Get started with Integration Hub | Sitefinity Cloud
This free lesson teaches administrators, marketers, and other business professionals how to use Sitefinity Integration Hub to create automated workflows between Sitefinity and other business systems.
Web Security for Sitefinity Administrators
This free lesson teaches administrators the basics about protecting your Sitefinity instance and your sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
Foundations of Sitefinity ASP.NET Core Development
The free on-demand video course teaches developers how to use Sitefinity ASP.NET Core and take advantage of its decoupled architecture and modern development model.