ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Access Radio Buttons inside Table in Controller in ASP.Net MVCHi @Prasunjeet,<br />Please try the following<br /><br /><a href = 'link(Threads/143776/How-to-save-record-RadioButton-inside-ListView-in-to-database-in-ASPNet/)'>How to save record RadioButton inside ListView in to database in ASP.Net</a><br /><br />It might help you.<br /><br />Cheers Andrea.https://www.aspforums.net:443/Threads/672991/Access-Radio-Buttons-inside-Table-in-Controller-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/672991/Access-Radio-Buttons-inside-Table-in-Controller-in-ASPNet-MVC/Sat, 10 Aug 2019 00:43:45 GMTAccess Radio Buttons inside Table in Controller in ASP.Net MVC<p>Thanks for the reply,</p> <p>But its not helpful for me a bit..</p> <p>I am using Razor View in MVC4 and Have created a table like as follows&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <pre class="brush: html">&lt;table&gt; &lt;tr&gt; &lt;td&gt;3.&lt;/td&gt; &lt;td style=&#34;text-align: left&#34;&gt;Question 1&lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Athree&#34; name=&#34;Athree&#34; type=&#34;radio&#34; value=&#34;StronglyAgree&#34; /&gt; &lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Radio49&#34; name=&#34;Athree&#34; type=&#34;radio&#34; value=&#34;Agree&#34; /&gt; &lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Radio50&#34; name=&#34;Athree&#34; type=&#34;radio&#34; value=&#34;Neutral&#34; /&gt; &lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Radio51&#34; name=&#34;Athree&#34; type=&#34;radio&#34; value=&#34;Disagree&#34; /&gt; &lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Radio52&#34; name=&#34;Athree&#34; type=&#34;radio&#34; value=&#34;StronglyDisagree&#34; /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;4.&lt;/td&gt; &lt;td style=&#34;text-align: left&#34;&gt;Question 2 &lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Afour&#34; name=&#34;Afour&#34; type=&#34;radio&#34; value=&#34;StronglyAgree&#34; /&gt; &lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Radio53&#34; name=&#34;Afour&#34; type=&#34;radio&#34; value=&#34;Agree&#34; /&gt; &lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Radio54&#34; name=&#34;Afour&#34; type=&#34;radio&#34; value=&#34;Neutral&#34; /&gt; &lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Radio55&#34; name=&#34;Afour&#34; type=&#34;radio&#34; value=&#34;Disagree&#34; /&gt; &lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Radio56&#34; name=&#34;Afour&#34; type=&#34;radio&#34; value=&#34;StronglyDisagree&#34; /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;</pre> <p>Now I want to write code to store this question and selected answer to database .. so how is this posssible in MVC4 with Razor View</p>https://www.aspforums.net:443/Threads/672991/Access-Radio-Buttons-inside-Table-in-Controller-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/672991/Access-Radio-Buttons-inside-Table-in-Controller-in-ASPNet-MVC/Sat, 10 Aug 2019 00:58:45 GMTAccess Radio Buttons inside Table in Controller in ASP.Net MVC<p>Hi <a class="username" rel="Prasunjeet"> Prasunjeet</a>,</p> <p>You can access the RadioButton Group value using the FormCollection.</p> <p>Check this example. Now please take its reference and correct your code.</p> <p><strong><span style="text-decoration: underline;">View</span></strong></p> <pre class="brush: csharp">public class HomeController : Controller { // GET: /Home/ public ActionResult Index() { return View(); } [HttpPost] public ActionResult Save(FormCollection collection) { string athree = collection[&#34;Athree&#34;]; string afour = collection[&#34;Afour&#34;]; return View(&#34;Index&#34;); } }</pre> <p><strong><span style="text-decoration: underline;">View</span></strong></p> <pre class="brush: html">&lt;table&gt; &lt;tr&gt; &lt;td&gt;3.&lt;/td&gt; &lt;td style=&#34;text-align: left&#34;&gt;Question 1&lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Athree&#34; name=&#34;Athree&#34; type=&#34;radio&#34; value=&#34;StronglyAgree&#34; /&gt;StronglyAgree &lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Radio49&#34; name=&#34;Athree&#34; type=&#34;radio&#34; value=&#34;Agree&#34; /&gt;Agree &lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Radio50&#34; name=&#34;Athree&#34; type=&#34;radio&#34; value=&#34;Neutral&#34; /&gt;Neutral &lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Radio51&#34; name=&#34;Athree&#34; type=&#34;radio&#34; value=&#34;Disagree&#34; /&gt;Disagree &lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Radio52&#34; name=&#34;Athree&#34; type=&#34;radio&#34; value=&#34;StronglyDisagree&#34; /&gt;StronglyDisagree &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;4.&lt;/td&gt; &lt;td style=&#34;text-align: left&#34;&gt;Question 2&lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Afour&#34; name=&#34;Afour&#34; type=&#34;radio&#34; value=&#34;StronglyAgree&#34; /&gt;StronglyAgree &lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Radio53&#34; name=&#34;Afour&#34; type=&#34;radio&#34; value=&#34;Agree&#34; /&gt;Agree &lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Radio54&#34; name=&#34;Afour&#34; type=&#34;radio&#34; value=&#34;Neutral&#34; /&gt;Neutral &lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Radio55&#34; name=&#34;Afour&#34; type=&#34;radio&#34; value=&#34;Disagree&#34; /&gt;Disagree &lt;/td&gt; &lt;td class=&#34;cell-center&#34;&gt; &lt;input id=&#34;Radio56&#34; name=&#34;Afour&#34; type=&#34;radio&#34; value=&#34;StronglyDisagree&#34; /&gt;StronglyDisagree &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;br /&gt; &lt;input type=&#34;submit&#34; value=&#34;Save&#34; /&gt;</pre> <p><strong><span style="text-decoration: underline;">Screenshot</span></strong></p> <p><img src="https://i.imgur.com/WGOalDA.gif" alt="" width="472" height="198" /></p>https://www.aspforums.net:443/Threads/672991/Access-Radio-Buttons-inside-Table-in-Controller-in-ASPNet-MVC/https://www.aspforums.net:443/Threads/672991/Access-Radio-Buttons-inside-Table-in-Controller-in-ASPNet-MVC/Tue, 13 Aug 2019 03:29:18 GMT