Create a “Hello, world!” widget
After you have created and setup your project, you can start creating widgets. To create the Hello World! widget and add it to your pages, you must open the project in Visual Studio, create a new user control, enter the message in the widget, build the project and register the widget in the Sitefinity page toolbox.
Follow the procedure below to create your first widget that will display the Hello world! message:
- From the Sitefinity Project Manager select Edit in Visual Studio.
For more information, see Functions of Sitefinity Project Manager.
- Create a new ASP.NET User Control in your project.
- Open the control for edit and enter the following markup:
<h1><asp:Literal runat="server" ID="helloWorldLtrl" Text="Hello, world!"></asp:Literal></h1>
- Save the changes and build the project.
- Open the website and follow procedure Registering a new widget in Sitefinity.
- After the widget is registered in the Sitefinity page toolbox, add it to your pages by following Adding widgets on your page procedure.