Click here to Skip to main content
15,887,453 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Log-in form question Pin
Member 87616677-Oct-14 9:17
Member 87616677-Oct-14 9:17 
GeneralRe: Log-in form question Pin
jkirkerx7-Oct-14 9:50
professionaljkirkerx7-Oct-14 9:50 
GeneralRe: Log-in form question Pin
Member 87616677-Oct-14 10:38
Member 87616677-Oct-14 10:38 
GeneralRe: Log-in form question Pin
jkirkerx7-Oct-14 10:56
professionaljkirkerx7-Oct-14 10:56 
GeneralRe: Log-in form question Pin
Member 87616677-Oct-14 11:37
Member 87616677-Oct-14 11:37 
GeneralRe: Log-in form question Pin
jkirkerx7-Oct-14 11:56
professionaljkirkerx7-Oct-14 11:56 
GeneralRe: Log-in form question Pin
Member 87616677-Oct-14 12:04
Member 87616677-Oct-14 12:04 
QuestionHow can i Post Radio Button List with Dynamic names to controller Pin
Mujtaba 103885433-Oct-14 18:24
professionalMujtaba 103885433-Oct-14 18:24 
Hi everyone.
I am well and truly stuck.
I have created a huge list of radio buttons on my razor view. Each row is a different set of radio buttons and I have given them each dynamic names.
I am new to MVC and i did not know how i can pass this radio button list to controller

this is my editor template

HTML
@model StudentManagement1.TeacherCourseStudent
@{
    ViewBag.Title = "Attendance";
}


<tr>
    
    
    <td>
       @Model.Student_Id
    </td>

    <td>
        @Model.Student.Name
    </td>

    <td>
        @Model.Student.Sur_Name
    </td>

    <td>
       @Model.Student.Semester.Semester_Name
    </td>

    <td>
    @Html.RadioButton(@Model.Student_Id.ToString(), "present", true)
    </td>

    <td>
    @Html.RadioButton(@Model.Student_Id.ToString(), "absent")
    </td>

    <td>
    @Html.RadioButton(@Model.Student_Id.ToString(), "leave")
    </td>


and this is my view
HTML
@model IEnumerable<StudentManagement1.TeacherCourseStudent>
@{
    ViewBag.Title = "MarkAttendance";
    Layout = "~/Views/Shared/_TeacherLayout.cshtml";
}

@using (Html.BeginForm("MarkAttendance", "Attendance", FormMethod.Post))
{
   

<table>
    <tr>
        <th>
           Student Id
        </th>
        <th>
            Name
        </th>
        <th>
           Sur Name
        </th>
        <th>
           Semester
        </th>
        <th>
            Present
        </th>
        <th>
            Absent
        </th>
        <th>
            Leave
        </th>

        
</tbody>
@Html.EditorForModel()
</table>
        <br /> <br />
    <input type="submit" value="Save attendance" />
}


here my controller to which i want to pass values
C#
[HttpPost]
        public ActionResult MarkAttendance(IEnumerable<string> Student_Id)
        {
            return view();
}

MVC

QuestionHow to find in useful/unnecessary files from website folder ??? Pin
Abhishek kumar1213-Oct-14 6:07
Abhishek kumar1213-Oct-14 6:07 
AnswerRe: How to find in useful/unnecessary files from website folder ??? Pin
ZurdoDev3-Oct-14 6:53
professionalZurdoDev3-Oct-14 6:53 
AnswerRe: How to find in useful/unnecessary files from website folder ??? Pin
jkirkerx3-Oct-14 11:21
professionaljkirkerx3-Oct-14 11:21 
Questionwhy onblur Event Dosent Work For Div Element ??????????? Pin
mhd.sbt3-Oct-14 6:03
mhd.sbt3-Oct-14 6:03 
AnswerRe: why onblur Event Dosent Work For Div Element ??????????? Pin
Richard Deeming3-Oct-14 6:31
mveRichard Deeming3-Oct-14 6:31 
GeneralRe: why onblur Event Dosent Work For Div Element ??????????? Pin
mhd.sbt5-Oct-14 10:59
mhd.sbt5-Oct-14 10:59 
GeneralRe: why onblur Event Dosent Work For Div Element ??????????? Pin
Praneet Nadkar5-Oct-14 19:52
Praneet Nadkar5-Oct-14 19:52 
QuestionI am stuck on this error now for two days - value cannot be null: Parameter name: reportParameters Pin
samflex3-Oct-14 2:58
samflex3-Oct-14 2:58 
AnswerRe: I am stuck on this error now for two days - value cannot be null: Parameter name: reportParameters Pin
ZurdoDev3-Oct-14 7:05
professionalZurdoDev3-Oct-14 7:05 
AnswerRe: I am stuck on this error now for two days - value cannot be null: Parameter name: reportParameters Pin
suppubale4-Oct-14 1:57
suppubale4-Oct-14 1:57 
Questiondelaying data load for a repeater on web form Pin
pmcm3-Oct-14 2:24
pmcm3-Oct-14 2:24 
QuestionBeginner Pin
tarun 922-Oct-14 9:40
professionaltarun 922-Oct-14 9:40 
AnswerRe: Beginner Pin
Richard MacCutchan2-Oct-14 21:47
mveRichard MacCutchan2-Oct-14 21:47 
AnswerRe: Beginner Pin
Suraj Sahoo | Coding Passion3-Oct-14 8:32
professionalSuraj Sahoo | Coding Passion3-Oct-14 8:32 
AnswerRe: Beginner Pin
suppubale4-Oct-14 1:49
suppubale4-Oct-14 1:49 
AnswerRe: Beginner Pin
Swinkaran5-Oct-14 12:22
professionalSwinkaran5-Oct-14 12:22 
AnswerRe: Beginner Pin
Dominic Burford8-Oct-14 3:56
professionalDominic Burford8-Oct-14 3:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.