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

ASP.NET

 
QuestionMVC 5 Scaffolded view problem Pin
AnCristina17-Jun-14 3:55
professionalAnCristina17-Jun-14 3:55 
AnswerRe: MVC 5 Scaffolded view problem Pin
AnCristina17-Jun-14 9:38
professionalAnCristina17-Jun-14 9:38 
AnswerRe: MVC 5 Scaffolded view problem Pin
Raviranjan_Kumar_Sinha17-Jun-14 20:53
Raviranjan_Kumar_Sinha17-Jun-14 20:53 
GeneralRe: MVC 5 Scaffolded view problem Pin
AnCristina19-Jun-14 2:40
professionalAnCristina19-Jun-14 2:40 
QuestionMVC 4 Radio Button List Pin
VishwaKL16-Jun-14 22:24
VishwaKL16-Jun-14 22:24 
AnswerRe: MVC 4 Radio Button List Pin
Raviranjan_Kumar_Sinha17-Jun-14 21:10
Raviranjan_Kumar_Sinha17-Jun-14 21:10 
GeneralRe: MVC 4 Radio Button List Pin
VishwaKL18-Jun-14 0:12
VishwaKL18-Jun-14 0:12 
GeneralRe: MVC 4 Radio Button List Pin
Raviranjan_Kumar_Sinha18-Jun-14 1:09
Raviranjan_Kumar_Sinha18-Jun-14 1:09 
Hi Vishwa,

Below i am giving idea how you can do it.

In View on top
@model IEnumerable<question>--> This is basically the list of Question that you have to return from controller method


Then HTML Code for Displaying the Question and their option

@foreach (Question question in Model)
{
@Html.DisplayFor(modelItem => question.QuestionText)
foreach (Option option in question.Options)
{
option.OptionText : @Html.RadioButtonFor(opt=>option.OptionID,option.OptionValue)
}
<HTML for like> Agree, DisAgree,...
}


The Class of Question and Option will be like below
public class Option{
public int OptionID{get;set;}
public string OptionText{get;set;}
public string OptionValue{get;set;}
}
public class Question{

public string QuestionText{get;set;}
public List Options{get;set;}//This will contain all 4 option
}

Class name and properties you can put whatever you want, i have just wrote sample.

Let me know if you have any doubt.

Thanks
Raviranjan
GeneralRe: MVC 4 Radio Button List Pin
VishwaKL18-Jun-14 22:44
VishwaKL18-Jun-14 22:44 
QuestionAdd New Row on ADO.NET Pin
Thomas Le 090316-Jun-14 2:26
Thomas Le 090316-Jun-14 2:26 
QuestionMVC Razor AD Authentication then use Entity Framework Authorization Pin
Stephen Holdorf14-Jun-14 8:45
Stephen Holdorf14-Jun-14 8:45 
AnswerRe: MVC Razor AD Authentication then use Entity Framework Authorization Pin
Stephen Holdorf15-Jun-14 10:05
Stephen Holdorf15-Jun-14 10:05 
Questionradio button postback event not working with bootstrap, asp.net Pin
webmas114-Jun-14 1:02
professionalwebmas114-Jun-14 1:02 
AnswerRe: radio button postback event not working with bootstrap, asp.net Pin
Member 1019884815-Jun-14 21:07
Member 1019884815-Jun-14 21:07 
GeneralRe: radio button postback event not working with bootstrap, asp.net Pin
webmas116-Jun-14 0:19
professionalwebmas116-Jun-14 0:19 
QuestionDynamic Web Site Pin
Irfan-Tech13-Jun-14 21:24
Irfan-Tech13-Jun-14 21:24 
AnswerRe: Dynamic Web Site Pin
Richard MacCutchan13-Jun-14 21:42
mveRichard MacCutchan13-Jun-14 21:42 
AnswerRe: Dynamic Web Site Pin
Peter Leow13-Jun-14 22:11
professionalPeter Leow13-Jun-14 22:11 
QuestionGet resolution in page load Pin
Elham M13-Jun-14 18:24
Elham M13-Jun-14 18:24 
QuestionWhich event is fired when Ctrl+N keys Clicked in asp.net Pin
shiv shanker 713-Jun-14 0:15
shiv shanker 713-Jun-14 0:15 
AnswerRe: Which event is fired when Ctrl+N keys Clicked in asp.net Pin
Vasudevan Deepak Kumar13-Jun-14 2:33
Vasudevan Deepak Kumar13-Jun-14 2:33 
GeneralRe: Which event is fired when Ctrl+N keys Clicked in asp.net Pin
shiv shanker 715-Jun-14 19:07
shiv shanker 715-Jun-14 19:07 
AnswerRe: Which event is fired when Ctrl+N keys Clicked in asp.net Pin
Vasudevan Deepak Kumar16-Jun-14 1:10
Vasudevan Deepak Kumar16-Jun-14 1:10 
GeneralRe: Which event is fired when Ctrl+N keys Clicked in asp.net Pin
shiv shanker 716-Jun-14 18:03
shiv shanker 716-Jun-14 18:03 
QuestionHow to filter a large datasource in ASPxComboBox? Pin
DitiDiti10-Jun-14 5:32
DitiDiti10-Jun-14 5:32 

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.