I want create Dropdownlist using Jquery but I am not able to get Result
- public JsonResult GetPipeNo(string MyStageCode)
- {
- db.Configuration.ProxyCreationEnabled = false;
- if (MyStageCode == "P3")
- {
- List
PipeList = db.PipeAls.ToList(); - return Json(PipeList, JsonRequestBehavior.AllowGet);
- }
- else
- {
- List
PipeList = db.Processes.Where(x => x.NextStageID == MyStageCode).ToList(); - return Json(PipeList, JsonRequestBehavior.AllowGet);
- }
- }
- @model EasyApp.Models.Process
- @{
- ViewBag.Title = "Create";
- }
- "~/Content/jquery-ui.css" rel="stylesheet" />
-
Add Daily Production
- class="EasyViewDiv">
- @using (Html.BeginForm())
- {
- @Html.AntiForgeryToken()
class="form-horizontal">- @Html.ValidationSummary(true, "", new { @class = "text-danger" })
class="form-group">- @Html.LabelFor(model => model.StageID, "Stage Name", htmlAttributes: new { @class = "control-label col-md-2" })
class="col-md-10">- @if (ViewBag.StageID != null)
- {
- @Html.DropDownListFor(model=>model.StageID, ViewBag.StageID as SelectList, "-----Select Stage ID---", new { @class="form-control"})
- }
- @Html.ValidationMessageFor(model => model.StageID, "", new { @class = "text-danger" })
class="form-group">- @Html.LabelFor(model => model.PRDate, "Production Date", htmlAttributes: new { @class = "control-label col-md-2" })
class="col-md-10">- @Html.TextBoxFor(model => model.PRDate, new { id = "datepicker", @class = "form-control" })
- @Html.ValidationMessageFor(model => model.PRDate, "", new { @class = "text-danger" })
class="form-group">- @Html.LabelFor(model => model.PIPENO, "Pipe No", htmlAttributes: new { @class = "control-label col-md-2" })
class="col-md-10">- @*@Html.DropDownList("PIPENO", null, htmlAttributes: new { @class = "form-control" })*@
- @Html.DropDownListFor(model => model.PIPENO, new SelectList(""), "--Select PipeNO--", new { @class = "form-control" })
- @Html.ValidationMessageFor(model => model.PIPENO, "", new { @class = "text-danger" })
class="form-group">- @Html.LabelFor(model => model.ATTNSYSID, "Operator Name", htmlAttributes: new { @class = "control-label col-md-2" })
class="col-md-10">- @*@Html.TextBoxFor(model => model.ATTNSYSID, new { id = "txtUserSearch", @class = "form-control" })*@
- @*@Html.DropDownListFor(model => model.ATTNSYSID, new SelectList(""), "--Select Operator--", new { @class = "form-control" })*@
- @Html.DropDownList("ATTNSYSID", null, htmlAttributes: new { @class = "form-control" })
- @Html.ValidationMessageFor(model => model.ATTNSYSID, "", new { @class = "text-danger" })
class="form-group">- @Html.LabelFor(model => model.Status, "Status", htmlAttributes: new { @class = "control-label col-md-2" })
class="col-md-10">- @Html.EditorFor(model => model.Status, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.Status, "", new { @class = "text-danger" })
class="form-group">- @Html.LabelFor(model => model.NextStageID, "Next Production Stage", htmlAttributes: new { @class = "control-label col-md-2" })
class="col-md-10">- @if (ViewBag.StageID != null)
- {
- @Html.DropDownListFor(model => model.NextStageID, ViewBag.StageID as SelectList, "-----Select Stage ID---", new { @class = "form-control" })
- }
- @*@Html.DropDownList("NextStageID", null, htmlAttributes: new { @class = "form-control" })
- @Html.DropDownListFor(model => model.NextStageID, ViewBag.NextStageList as SelectList, "-----Select Next Stage ID---", new { @class = "form-control" })*@
- @Html.ValidationMessageFor(model => model.NextStageID, "", new { @class = "text-danger" })
class="dropdown-menu">class="form-group">class="col-md-offset-2 col-md-10">- "submit" value="Create" class="btn btn-default" />
- }
- @Html.ActionLink("Back to List", "Index")
-

Manas MohapatraPosted Aug 10, 2017, 3:31 AM