Click here to Skip to main content
11,488,877 members (74,833 online)

Web Development

 
GeneralRe: VS2010 Website Templates Pin
Kevin Marois21-Feb-13 12:37
memberKevin Marois21-Feb-13 12:37 
QuestionCertificate Question [modified] Pin
AnalogNerd21-Feb-13 4:03
memberAnalogNerd21-Feb-13 4:03 
Questionhow to add Search Functionality in MVC 4 web form Pin
abdul ahad hussain18-Feb-13 22:26
memberabdul ahad hussain18-Feb-13 22:26 
QuestionNeed guidance for file upload Pin
lisadmendez16-Feb-13 5:57
memberlisadmendez16-Feb-13 5:57 
AnswerRe: Need guidance for file upload Pin
overtech064-Mar-13 9:10
memberovertech064-Mar-13 9:10 
GeneralRe: Need guidance for file upload Pin
lisadmendez5-Mar-13 7:33
memberlisadmendez5-Mar-13 7:33 
Questionconnecting to Oracle 11g database using PHP Pin
vln1514-Feb-13 1:10
membervln1514-Feb-13 1:10 
QuestionNeed of Online Shopping sourcecode using JSP Pin
Member 981710712-Feb-13 23:04
memberMember 981710712-Feb-13 23:04 
AnswerRe: Need of Online Shopping sourcecode using JSP Pin
Richard MacCutchan12-Feb-13 23:29
mvpRichard MacCutchan12-Feb-13 23:29 
AnswerRe: Need of Online Shopping sourcecode using JSP Pin
Steve Mayfield13-Feb-13 6:51
memberSteve Mayfield13-Feb-13 6:51 
QuestionProposals for a final internship studies Pin
simontifo12-Feb-13 14:31
membersimontifo12-Feb-13 14:31 
AnswerRe: Proposals for a final internship studies Pin
Jibesh12-Feb-13 15:30
memberJibesh12-Feb-13 15:30 
GeneralRe: Proposals for a final internship studies Pin
simontifo28-Feb-13 20:47
membersimontifo28-Feb-13 20:47 
QuestionMVC: Pass List<> between View and Controller Pin
astuserp12-Feb-13 0:05
memberastuserp12-Feb-13 0:05 
}

Now, the question that I am wondering is why the List skills become null when it returns from the view, while it was passed with value before the view is shown.

Does anyone have any clue what I am missing? I really can not figure out why.
Thank you for any enlightenment that you may provide.
Dear Fellow developer. I am a newbie in MVC. Recently I try to perform the following:

//--- Model
public class Skill
{
public bool IsSkill { get; set; }
public string SkillStr { get; set; }
}

public class PageModel
{
public string UserName { get; set; }
public string Address { get; set; }
public List skills { get; set; }
}

//---Controller
public ViewResult UpdateSkills(int id)
{
PageModel model = GetPageModel(id);
model.skills = GetSkills(id);
return View(model);
}

[HttpPost]
public ActionResult UpdateSkills(PageModel model)
{
if (ModelState.IsValid)
{
List SkillStr = new List();

// ERROR: model.skills null
foreach (Skill rw in model.skills)
{
if (rw.IsSkill)
{
SkillStr.Add(rw.SkillStr);
}
}
}
// ... Other code are omitted
}


//--- View
<!-- Other are omitted --!>

@foreach(Skill rw in Model.skills)
{
@Html.EditorFor(m => rw.IsSkill) @Html.DisplayFor(m => rw.SkillStr)
AnswerRe: MVC: Pass List<> between View and Controller Pin
Bram van Kampen22-Feb-13 16:16
memberBram van Kampen22-Feb-13 16:16 
GeneralRe: MVC: Pass List<> between View and Controller Pin
astuserp24-Feb-13 16:20
memberastuserp24-Feb-13 16:20 
Questionweb development Pin
Durgesh1704r5-Feb-13 2:30
memberDurgesh1704r5-Feb-13 2:30 
AnswerRe: web development Pin
Richard MacCutchan5-Feb-13 2:35
mvpRichard MacCutchan5-Feb-13 2:35 
QuestionRe: web development Pin
Durgesh1704r7-Feb-13 1:55
memberDurgesh1704r7-Feb-13 1:55 
AnswerRe: web development Pin
Richard MacCutchan7-Feb-13 2:32
mvpRichard MacCutchan7-Feb-13 2:32 
AnswerRe: web development Pin
Sandeep Mewara5-Feb-13 3:26
mvpSandeep Mewara5-Feb-13 3:26 
Questionweb development Pin
Durgesh1704r7-Feb-13 1:51
memberDurgesh1704r7-Feb-13 1:51 
AnswerRe: web development Pin
Sandeep Mewara8-Feb-13 4:56
mvpSandeep Mewara8-Feb-13 4:56 
AnswerRe: web development Pin
Rahul Rajat Singh5-Feb-13 20:21
mvpRahul Rajat Singh5-Feb-13 20:21 
Questionweb development Pin
Durgesh1704r7-Feb-13 1:53
memberDurgesh1704r7-Feb-13 1:53 
AnswerRe: web development Pin
Rahul Rajat Singh7-Feb-13 18:35
mvpRahul Rajat Singh7-Feb-13 18:35 
Generalweb development Pin
Durgesh1704r8-Feb-13 1:39
memberDurgesh1704r8-Feb-13 1:39 
QuestionDynamic Website Deployment in IIS 6 Pin
dihnekhs_gr4-Feb-13 4:07
memberdihnekhs_gr4-Feb-13 4:07 
QuestionExport to excel Pin
codeprojectbalaji4-Feb-13 0:03
membercodeprojectbalaji4-Feb-13 0:03 
QuestionDataSet Pin
Abdulla_M3-Feb-13 22:01
memberAbdulla_M3-Feb-13 22:01 
AnswerRe: DataSet Pin
Sandeep Mewara3-Feb-13 22:38
mvpSandeep Mewara3-Feb-13 22:38 
GeneralRe: DataSet Pin
Abdulla_M4-Feb-13 0:02
memberAbdulla_M4-Feb-13 0:02 
QuestionHow to Approach Real Time Updates with Web Services Pin
Richard Andrew x642-Feb-13 18:56
memberRichard Andrew x642-Feb-13 18:56 
AnswerRe: How to Approach Real Time Updates with Web Services Pin
SoMad12-Feb-13 2:36
memberSoMad12-Feb-13 2:36 
GeneralRe: How to Approach Real Time Updates with Web Services Pin
Richard Andrew x6412-Feb-13 8:21
memberRichard Andrew x6412-Feb-13 8:21 
QuestionI am developing a GPS tracking app on Android .but i want to make web server which take update from cell using GPS. Pin
babarkhalid1-Feb-13 22:00
memberbabarkhalid1-Feb-13 22:00 
AnswerRe: I am developing a GPS tracking app on Android .but i want to make web server which take update from cell using GPS. Pin
Richard MacCutchan2-Feb-13 0:06
mvpRichard MacCutchan2-Feb-13 0:06 
GeneralRe: I am developing a GPS tracking app on Android .but i want to make web server which take update from cell using GPS. Pin
babarkhalid2-Feb-13 0:10
memberbabarkhalid2-Feb-13 0:10 
GeneralRe: I am developing a GPS tracking app on Android .but i want to make web server which take update from cell using GPS. Pin
Richard MacCutchan2-Feb-13 0:40
mvpRichard MacCutchan2-Feb-13 0:40 
GeneralRe: I am developing a GPS tracking app on Android .but i want to make web server which take update from cell using GPS. Pin
babarkhalid2-Feb-13 0:44
memberbabarkhalid2-Feb-13 0:44 
GeneralRe: I am developing a GPS tracking app on Android .but i want to make web server which take update from cell using GPS. Pin
Richard MacCutchan2-Feb-13 1:01
mvpRichard MacCutchan2-Feb-13 1:01 
Questionany one tell me how to make online exam test using mvc asp.net and database SQL? Pin
babarkhalid1-Feb-13 20:49
memberbabarkhalid1-Feb-13 20:49 
AnswerRe: any one tell me how to make online exam test using mvc asp.net and database SQL? Pin
Sandeep Mewara1-Feb-13 21:50
mvpSandeep Mewara1-Feb-13 21:50 
GeneralRe: any one tell me how to make online exam test using mvc asp.net and database SQL? Pin
babarkhalid1-Feb-13 21:57
memberbabarkhalid1-Feb-13 21:57 
Questionuse of SECTION in Html 5 Pin
Swinkaran25-Jan-13 15:35
memberSwinkaran25-Jan-13 15:35 
AnswerRe: use of SECTION in Html 5 Pin
Ankur\m/28-Jan-13 21:03
memberAnkur\m/28-Jan-13 21:03 
GeneralRe: use of SECTION in Html 5 Pin
AmbientCoding29-Jan-13 13:38
memberAmbientCoding29-Jan-13 13:38 
AnswerRe: use of SECTION in Html 5 Pin
erikroyall4-Feb-13 7:51
membererikroyall4-Feb-13 7:51 
Questionsubir archivos en php Pin
Member 978298924-Jan-13 4:41
memberMember 978298924-Jan-13 4:41 
Questionasp.net security in 3 tier.. Pin
shafeeq_dba21-Jan-13 3:21
membershafeeq_dba21-Jan-13 3:21 

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

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


Advertise | Privacy | Mobile
Web01 | 2.8.150520.1 | Last Updated 27 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid