Click here to Skip to main content
15,920,031 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Desktop application "communicating" with ASP.NET Pin
The Junior5-Oct-17 4:24
The Junior5-Oct-17 4:24 
SuggestionRe: Desktop application "communicating" with ASP.NET Pin
Richard Deeming5-Oct-17 4:08
mveRichard Deeming5-Oct-17 4:08 
GeneralRe: Desktop application "communicating" with ASP.NET Pin
The Junior5-Oct-17 4:21
The Junior5-Oct-17 4:21 
GeneralRe: Desktop application "communicating" with ASP.NET Pin
David Mujica5-Oct-17 9:08
David Mujica5-Oct-17 9:08 
GeneralRe: Desktop application "communicating" with ASP.NET Pin
The Junior5-Oct-17 21:34
The Junior5-Oct-17 21:34 
QuestionProgramming Chat supports video and audio and the number of connected high Pin
Member 1343772929-Sep-17 12:07
professionalMember 1343772929-Sep-17 12:07 
AnswerRe: Programming Chat supports video and audio and the number of connected high Pin
ZurdoDev2-Oct-17 4:10
professionalZurdoDev2-Oct-17 4:10 
QuestionImplementation advice for quiz with 4 choice questions Pin
Farhad Eft28-Sep-17 10:09
Farhad Eft28-Sep-17 10:09 
Hey, I', looking for some implementation advice. I am creating this ASP.NET MVC page for quizzes that each course may have a different number of questions with 4 choices. I would like to send the questions to my view as my Model, and by submitting the form, my controller endpoint receives the Id of the questions and selected answers.
Can you please give me some tips that how to send such information to my controller using the sample code I wrote in the following?

Thank you in advance.

My Model

public class QuizQuestion
    {
        [Key]
        public int QuestionId { get; set; }
        public int CourseId { get; set; }
        public int Order { get; set; }
        public string Question { get; set; }
        public string Choice1 { get; set; }
        public string Choice2 { get; set; }
        public string Choice3 { get; set; }
        public string Choice4 { get; set; }
        public int RightAnswer { get; set; }
    }

My View

using (Html.BeginForm("Submit", "Quiz", FormMethod.Post, new { }))
                        {
                        @Html.AntiForgeryToken()
                        foreach (var item in Model.QuizJustQuestionsDto)
                        {
                        <div class="row">
                            @(item.Order + ". " + item.Question)<br />
                            @Html.RadioButton(item.QuestionId.ToString(), 1) @Html.Label(item.Choice1)<br />
                            @Html.RadioButton(item.QuestionId.ToString(), 2) @Html.Label(item.Choice2)<br />
                            @Html.RadioButton(item.QuestionId.ToString(), 3) @Html.Label(item.Choice3)<br />
                            @Html.RadioButton(item.QuestionId.ToString(), 4) @Html.Label(item.Choice4)
                        </div>
                        }

AnswerRe: Implementation advice for quiz with 4 choice questions Pin
Farhad Eft30-Sep-17 6:31
Farhad Eft30-Sep-17 6:31 
QuestionASP.NET authorization Pin
SaeedPol27-Sep-17 8:30
SaeedPol27-Sep-17 8:30 
AnswerRe: ASP.NET authorization Pin
The Junior5-Oct-17 4:34
The Junior5-Oct-17 4:34 
QuestionRepeater Template Desinging Pin
Member 1337195126-Sep-17 8:41
Member 1337195126-Sep-17 8:41 
AnswerRe: Repeater Template Desinging Pin
A_Griffin26-Sep-17 9:26
A_Griffin26-Sep-17 9:26 
GeneralRe: Repeater Template Desinging Pin
Member 1337195126-Sep-17 9:28
Member 1337195126-Sep-17 9:28 
GeneralRe: Repeater Template Desinging Pin
A_Griffin26-Sep-17 9:33
A_Griffin26-Sep-17 9:33 
GeneralRe: Repeater Template Desinging Pin
Member 1337195126-Sep-17 9:36
Member 1337195126-Sep-17 9:36 
GeneralRe: Repeater Template Desinging Pin
A_Griffin26-Sep-17 9:42
A_Griffin26-Sep-17 9:42 
GeneralRe: Repeater Template Desinging Pin
Member 1337195126-Sep-17 9:44
Member 1337195126-Sep-17 9:44 
AnswerRe: Repeater Template Desinging Pin
Rollin Shultz28-Sep-17 2:08
Rollin Shultz28-Sep-17 2:08 
QuestionHow can I properly use the Trace.Write() method inside of my for loop to print month and future values? Pin
Dorakta21-Sep-17 12:36
Dorakta21-Sep-17 12:36 
AnswerRe: How can I properly use the Trace.Write() method inside of my for loop to print month and future values? Pin
Richard Deeming22-Sep-17 2:11
mveRichard Deeming22-Sep-17 2:11 
QuestionSystem.ServiceModel.FaultException`1 occurred Pin
jkirkerx21-Sep-17 12:05
professionaljkirkerx21-Sep-17 12:05 
AnswerRe: System.ServiceModel.FaultException`1 occurred Pin
jkirkerx22-Sep-17 6:29
professionaljkirkerx22-Sep-17 6:29 
AnswerUPS Rate SOAP WSDL Errors in VS2017 Service Reference, An exception has been raised as a result of client data. Pin
jkirkerx22-Sep-17 11:07
professionaljkirkerx22-Sep-17 11:07 
QuestionRepeater2 is not getting populated with data from Repeater2. Any ideas? Pin
samflex20-Sep-17 4:38
samflex20-Sep-17 4:38 

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.