public ActionResult AddUpdateQuestionPartial(long?questionID) { MLQuestion objMLQuestion = new MLQuestion(); objBLCommon = new BLCommon(); MLDropdownBindOption objMLDDLBind = new MLDropdownBindOption(); objMLDDLBind.TableName = "tblSubject"; objMLDDLBind.ColID = "SID"; objMLDDLBind.ColText = "Subject"; objMLDDLBind.Option = ""; ViewBag.ListSubject = objBLCommon.GetDropdownList(objMLDDLBind).ToList(); if (questionID > 0) { //Fetch records from database } else { objMLQuestion.ListAnswers = new List <MLAnswer> { new MLAnswer(), new MLAnswer() }; } return(PartialView("_AddUpdateQuestion", objMLQuestion)); }