finding index of accordion menu in asp.net mvc and Razor view

mehrdad5775 1 Reputation point
2022-10-15T12:01:45.793+00:00

Is there any body can help me to find the index of accordion menu in asp.net mvc project with Razor view.
I fill my Index page with local data (a model not from database) then clicking on a submenu and finally pass the index of accordion menu record and submenus(radiobutton selected index) to the action result
@默 IEnumerable<Menu.Models.Room>
@using (Html.BeginForm("Index", "Home", FormMethod.Post))
{
int i = 1;
foreach (var item in Model)
{
<div id="proboxmain" class="proboxmain">
<div class="proboxtitle" onclick="runprobox(@i)">
@azzedinehtmlsql .DisplayFor(Modelitem => item.RoomName) |
@azzedinehtmlsql .DisplayFor(Modelitem => item.ReservationNumber) |
@azzedinehtmlsql .DisplayFor(Modelitem => item.FullName)

            </div>  
            <div id="@i" class="proboxcontent">  
                <fieldset style="height: inherit;">  
                    <div id="div_Q1">  
                        <div id="tb_Q">  
                            <div id="Q1_text" class="shiny-html-output">  
                            </div>  
                        </div>  
                        <div id="tb_Qt">  
                            <div id="Q1" class="shiny-html-output">  
                            </div>  
                        </div>  
                        <div id="div_ans">  
                            <div id="select" class="form-group shiny-input-radiogroup shiny-input-container shiny-input-container-inline">  
                                <div class="shiny-options-group">  
                                    <label class="radio-inline">  
                                        <input type="radio" name="select" value=@item.Amount1 />  
                                        @Html.DisplayFor(Modelitem => item.Amount1)  
                                    </label>  
                                    <label class="radio-inline">  
                                        <input type="radio" name="select" value=@item.Amount2 />  
                                        @Html.DisplayFor(Modelitem => item.Amount2)  
                                    </label>  
                                    <label class="radio-inline">  
                                        <input type="radio" name="select" value=@item.Amount3 />  
                                        @Html.DisplayFor(Modelitem => item.Amount3)  
                                    </label>  
                                    <label class="radio-inline">  
                                        <input type="radio" name="select" value=@item.Amount4 />  
                                        @Html.DisplayFor(Modelitem => item.Amount4)  
                                    </label>  
                                    <label class="radio-inline">  
                                        <input type="radio" name="select" value=@item.Amount5 />  
                                        @Html.DisplayFor(Modelitem => item.Amount5)  
                                    </label>  
                                    <label class="radio-inline">  
                                        <input type="radio" name="select" value=@item.Amount6 />  
                                        @Html.DisplayFor(Modelitem => item.Amount6)  
                                    </label>  
                                </div>  
                            </div>  
                        </div>  
                    </div>  
                </fieldset>  
                <fieldset style="height: 30px;">  
                    <input type="submit" value="pay" class="jj"/>  
                </fieldset>  
            </div>  
        </div>  
        i++;  
    }  

}

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,315 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
902 questions
{count} votes