The DailyStory .NET SDK is an open source library hosted on GitHub used by .NET developers to integrate DailyStory's capabilities into their .NET application.
DailyStory Web Forms enable you to create, design and manage web forms within DailyStory. You can then include those forms within your web application to request information from visitors, such as a signing up for a newsletter.
A web form is part of a DailyStory campaign and once a form is submitted the contents are used to either create a new lead within a campaign or add to an existing lead.
To include a DailyStory Web Form in your existing ASP.NET application, follow these steps:
Either compile the .NET SDK yourself, or use the pre-compiled
DailyStory.SDK.DotNet.dll library included with the SDK, and include it in the \bin folder of your ASP.NET application.
Find your DailyStory Site Id, as this will be required to use the .NET SDK. You can find your Site Id on the Tracking Code page in your DailyStory application.
Next, get the Unique Id of the DailyStory Web Form you want to include. You can find your Web Form Unique Id by clicking on any Web Form.
Open or create an ASP.NET page and include a reference to the
DailyStory.SDK.DotNet and render the web form using the static
@using DailyStory.SDK.DotNet <h1>Hello world!</h1> @Html.Raw(WebForm.RenderWebForm("[Your Site Id]", "[Your Web Form Id]"))
Replace [Your Site Id] and [Your Form Id] with the values from your DailyStory application from step 2 and step 3.
When you run this page, you should see something similar to this:
To make things simple, DailyStory uses Bootstrap class names in the CSS. While not required, this means that you can quickly use the Bootstrap framework to immediately make your form responsive and adaptive (i.e., mobile friendly).
Finally, DailyStory additionally provides some pre-built CSS files to add form validation and basic styling. These are completely optional:
Now our web form looks a little nicer:
There are several pre-built CSS templates to choose from. For example, if you want a simple horizontal form you can replace the
base_webform-horizontal.css and change the Web Form Layout to Hide Form Labels:
If you would like to see more examples please see our .NET Example Application in the SDK.