G
G
Gepard_vvk2015-01-29 12:07:27
HTML
Gepard_vvk, 2015-01-29 12:07:27

Why doesn't razor render the value attribute of radio buttons?

There is such a piece of View code (using the Razor engine)

<div class="indicatorGroup">
                <div class="text">
                    <label>@item.Name</label>
                </div>
                <div class="inputsGroup" id="@ViewData.TemplateInfo.GetFullHtmlFieldId(prefix + @item.UniqueId + "_" + @item.SortNumber)">
                    <label class="radioInline">
                        <input type="radio" name="@item.UniqueId" id="@(radioIndex + 1)" value="1" />
                        Не определено
                    </label>
                    <label class="radioInline">
                        <input type="radio" name="@item.UniqueId" id="@(radioIndex+2)" value="2" />
                        Да
                    </label>
                    <label class="radioInline">
                        <input type="radio" name="@item.UniqueId" id="@(radioIndex + 3)" value="3"/>
                        Нет
                    </label>
                </div>
            </div>

Radio buttons are rendered like this:
<input type="radio" name="263b7a4c-70a4-4f32-91ab-e0f677c89819" id="18" value="">

Why doesn't value contain the value that is specified in the view's markup?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Q
Quattro Vias, 2018-09-30
@Quattro_Vias

<?php echo $_SESSION['logged_user']->login; ?>!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question