Reputation: 4100
Sorry for long description but it is necessary to describe my problem. I have made a web form where the staff can edit their detail. E.g Address Details.
So The data for editing is shown to the user using following code.
<p>Address</p>
<asp:TextBox runat="server" ID="txtBoxAdd"></asp:TextBox>
<p>City</p>
<asp:TextBox runat="server" ID="txtBoxCity"></asp:TextBox>
<p>Country</p>
<asp:TextBox runat="server" ID="txtBoxCountry"></asp:TextBox>
BackEnd.
txtBoxAdd.Text = addressItem["address"];
txtBoxCity.Text = addressItem["city"];
txtBoxCountry.Text = addressItem["country"];
When the user clicks on Save
Button, the item is put in editing mode. addressItem.Editing.BeginEdit();
And update the fields with the values in the text boxes.
Now The addressItem
with the field country
, addressItem["country"]
is a dropdown in sitecore. With source as (the template for the addressItem):
Is it possible that I show this drop down in the front end. filled with all the values from the sitecore.
What I am thinking is to make a dropdown list and add in it all the children of item /sitecore/content/Site Config/Constants/Countries
. But I guess there could be a better solution?
Upvotes: 1
Views: 1759