Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to Pass Model from view to Controller
    text
    copied!<p>I'm having following view page,</p> <pre><code> @using (Html.BeginForm()) { &lt;fieldset class="fs"&gt; @foreach (var item in Model.lstTravelReadyEntities) { &lt;label class="Detail1"&gt;&lt;b&gt;Associate Id : &lt;/b&gt;@item.Var_AssoId &lt;/label&gt; &lt;label class="Detail1"&gt;&lt;b&gt;Vertical :&lt;/b&gt;@item.Var_Vertical&lt;/label&gt; &lt;label class="Detail1"&gt;&lt;b&gt;Visa ValidFrom :&lt;/b&gt;@item.Dt_VisaValidFrom &lt;/label&gt;&lt;br /&gt;&lt;br /&gt; &lt;label class="Detail2"&gt;&lt;b&gt;Associate Name :&lt;/b&gt;@item.Var_AssociateName&lt;/label&gt; &lt;label class="Detail2"&gt;&lt;b&gt;Account Name :&lt;/b&gt;@item.Var_AccountName&lt;/label&gt; &lt;label class="Detail2"&gt;&lt;b&gt;Visa ValidDate :&lt;/b&gt;@item.Dt_VisaValidTill&lt;/label&gt;&lt;br /&gt;&lt;br /&gt; &lt;label class="Detail3"&gt;&lt;b&gt;Grade HR :&lt;/b&gt;@item.Var_Grade&lt;/label&gt; &lt;label class="Detail3"&gt;&lt;b&gt;Project Name :&lt;/b&gt;@item.Var_Project_Desc&lt;/label&gt;&lt;br /&gt; } &lt;h2&gt; Response Details&lt;/h2&gt;&lt;br /&gt; Supervisor Response :&lt;input type="radio" class="radi" name="radio" value="yes" onclick="javascript:Getfunc(this.value);"&gt;Yes &lt;input type="radio" name="radio" value="no" onclick="javascript:Getfunc(this.value)"&gt;No &lt;div id="es"&gt;&lt;/div&gt; &lt;input type="submit" id="insert" value="Submit" name="Submit" onclick="javascript:InsertDetails(item);"/&gt; &lt;/fieldset&gt; } </code></pre> <p>I want pass all the values of this view page to the controller as parameters for inserting these values into the new table.How can i Achieve this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload