Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model ProductType
- @{
- ViewData["Title"] = "Product Type";
- }
- @Html.LabelFor(x => x, "Food")
- @if (Model == ProductType.Food)
- {
- @Html.RadioButtonFor(x => x, (int)ProductType.Food, new { @checked = "checked" });
- }
- else
- {
- @Html.RadioButtonFor(x => x, (int)ProductType.Food);
- }
- @Html.LabelFor(x => x, "Cosmetic")
- @if (Model == ProductType.Cosmetic)
- {
- @Html.RadioButtonFor(x => x, (int)ProductType.Cosmetic, new { @checked = "checked" });
- }
- else
- {
- @Html.RadioButtonFor(x => x, (int)ProductType.Cosmetic);
- }
- @Html.LabelFor(x => x, "Domestic")
- @if (Model == ProductType.Domestic)
- {
- @Html.RadioButtonFor(x => x, (int)ProductType.Domestic, new { @checked = "checked" });
- }
- else
- {
- @Html.RadioButtonFor(x => x, (int)ProductType.Domestic);
- }
- @Html.LabelFor(x => x, "Health")
- @if (Model == ProductType.Health)
- {
- @Html.RadioButtonFor(x => x, (int)ProductType.Health, new { @checked = "checked" });
- }
- else
- {
- @Html.RadioButtonFor(x => x, (int)ProductType.Health);
- }
- @Html.LabelFor(x => x, "Other")
- @if (Model == ProductType.Other)
- {
- @Html.RadioButtonFor(x => x, (int)ProductType.Other, new { @checked = "checked" });
- }
- else
- {
- @Html.RadioButtonFor(x => x, (int)ProductType.Other);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement