Form.HtmlId

Version: - string  

Summary

Returns an ID that can be used as ID attribute.

Settings

The value is generated automatically.

Examples

Outputting the template tag

@GetString("Form.HtmlId")

Check if tag has a value

@if(!string.IsNullOrWhiteSpace(GetString("Form.HtmlId"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ string storedTag = GetString("Form.HtmlId"); }

Outputting the template tag

<!--@Form.HtmlId-->

Check if string has a value

<!--@If Defined(@Form.HtmlId)--> Let's output this tag here: <strong><!--@Form.HtmlId--></strong> <!--@EndIf(@Form.HtmlId)-->