Hi folks,
yeah :( simple question * blush *
Lets imagine i have the following enumeration:-
string[] languages = new string[]
{
"en (uk)", // English (colour)
"en (us)", // English (color)
"fr", // French
"es" // Spanish
};
ViewData["Languages"] = languages;
ViewData["UserLanguage"] = "en (uk)";
Armed with this, how would i display a radio button in the View? Is the only way to do this to enumerate through all the language values and render a RadioBox?
eg. pseduo-code...
<% foreach(string language in ViewData["Languages"] as string[])
{
response.write Html.RadioBox(... not sure what to set in here ...)
}%>
cheers!