I have an asp form in a web form template linked to a masterpage I created and I would like the dropdown values to be razor navigation page names / properties.
I can insert a macro to retrieve the page names I want in a list, e.g.:
[code]<umbraco:Macro runat="server" language="cshtml"> @{ @* Get the root of the website *@ var root = Model.AncestorOrSelf(1); }
@foreach (var page in root.Children.Where("Visible")) {
Dropdown list items in asp form
Hi all,
I have an asp form in a web form template linked to a masterpage I created and I would like the dropdown values to be razor navigation page names / properties.
I can insert a macro to retrieve the page names I want in a list, e.g.:
[code]<umbraco:Macro runat="server" language="cshtml">
@{
@* Get the root of the website *@
var root = Model.AncestorOrSelf(1);
}
@foreach (var page in root.Children.Where("Visible"))
{
<li class="menu">
<a href="@page.Url">@page.Name</a>
</li>
}[/code]
However is it possible to do something like this within the asp dropdown tags?
is working on a reply...