How to set Session to ReceiveInvoice in Combobox to hold the Receive_ID for very next Entry - asp.net-mvc

I want to use receive invoice for very next entry using session but it don't. Here I populate Receive InvoiceNo in create controller. please help me..
var rmaster = db.FactoryReceiveMaster.ToList();
List<SelectListItem> lstFactoryReceiveMaster = new List<SelectListItem>();
if (rmaster != null && rmaster.Count > 0)
{
foreach (var rInvoice in rmaster)
{
SelectListItem item = new SelectListItem { Text = rInvoice.RInvoiceNo, Value = rInvoice.Receive_ID.ToString(), Selected = false };
lstFactoryReceiveMaster.Add(item);
}
}
Session["lstFactoryReceiveMaster"] = lstFactoryReceiveMaster;
model.AssembleInvoice = lstFactoryReceiveMaster;
Create View....
#using Kendo.Mvc.UI;
#model MvcMahindraTwoWheelerERP.Models.FactoryProductAssembledViewModel
<div class="panel panel-info">
<div class="panel-heading">
<h3 style="font-family:cursive;font-size:large;"> Assemble Product - Entry Form</h3>
</div>
<div class="panel-body">
#using (Html.BeginForm("Create", "FactoryAssembleProduct", FormMethod.Post))
{
#Html.ValidationSummary(true, "", new { #class = "text-danger" })
<div class="form-horizontal">
<div class="form-group">
<div class="form-group">
<div class="col-sm-offset-1 col-sm-4">
#Html.LabelFor(model => model.Assembled_Date)
#(Html.Kendo().DatePickerFor(model => model.Assembled_Date).Format("dd/MMM/yyyy").HtmlAttributes(new { #style = "width:100%;"}))
#Html.ValidationMessageFor(model => model.Assembled_Date)
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-4">
#Html.LabelFor(model => model.FactoryReceiveMaster.RInvoiceNo)
#(Html.Kendo().ComboBoxFor(model => model.FactoryReceiveMaster.Receive_ID).BindTo(Model.AssembleInvoice).HtmlAttributes(new {#style = "width:100%;"}))
#Html.ValidationMessageFor(model => model.FactoryReceiveMaster.Receive_ID)
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-4">
#Html.LabelFor(model => model.Product.ProdCode)
#(Html.Kendo().ComboBoxFor(model => model.Product.ProductID).BindTo(Model.AssembleProducts).HtmlAttributes(new {id="ProductID", #style = "width:100%;"}).Filter(FilterType.Contains))
#Html.ValidationMessageFor(model => model.Product.ProductID)
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-4">
#Html.LabelFor(model => model.Description)
#Html.TextBoxFor(model => model.Description, new { id="descriptipn", #class = "form-control" })
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-4">
#Html.LabelFor(model => model.Chassis_No)
#Html.TextBoxFor(model => model.Chassis_No, new {#class = "form-control" })
#Html.ValidationMessageFor(model => model.Chassis_No)
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-4">
#Html.LabelFor(model => model.Engine_No)
#Html.TextBoxFor(model => model.Engine_No, new {#class = "form-control" })
#Html.ValidationMessageFor(model => model.Engine_No)
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-4">
#Html.LabelFor(model => model.Key_No)
#Html.TextBoxFor(model => model.Key_No, new {#class = "form-control" })
#Html.ValidationMessageFor(model => model.Key_No)
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-4">
#Html.LabelFor(model => model.Remarks)
#Html.TextBoxFor(model => model.Remarks, new {#class = "form-control" })
#Html.ValidationMessageFor(model =>model.Remarks)
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-4">
<input type="submit" class="btn btn-lg btn-primary btn-block" value="Save Changes" />
</div>
</div>
</div>
</div>
}
</div>
Now, now how to fix it ...?

Related

File upload issue in Asp.net mvc

I added HTML input type file After I run the project and click to the input file for choosing my file. When I choose file and click OK after Stopped my project.
What is the problem?
#using (Html.BeginForm("Update", "User", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<div class="col-sm-3">
<div class="profile_img">
<div id="crop-avatar">
<img class="img-responsive avatar-view" width="250" height="150" src="~/Styles/images/#Model.User.Image" alt="Avatar" title="Change the avatar">
</div>
</div>
<div class="form-group">
<input type="file" name="file" id="file1" />
</div>
</div>
<div class="col-sm-8 form-horizontal form-label-left">
<div class="form-group">
#Html.LabelFor(model => model.User.FirstName, new { #class = "control-label col-md-3 col-sm-3 col-xs-12" })
<div class="col-md-8 col-sm-6 col-xs-12">
#Html.TextBoxFor(model => model.User.FirstName, new { #class = "form-control col-md-7 col-xs-12" })
</div>
</div>
<div class="form-group">
#Html.LabelFor(model => model.User.LastName, new { #class = "control-label col-md-3 col-sm-3 col-xs-12" })
<div class="col-md-8 col-sm-6 col-xs-12">
#Html.TextBoxFor(model => model.User.LastName, new { #class = "form-control col-md-7 col-xs-12" })
</div>
</div>
<div class="form-group">
#Html.LabelFor(model => model.User.MiddleName, new { #class = "control-label col-md-3 col-sm-3 col-xs-12" })
<div class="col-md-8 col-sm-6 col-xs-12">
#Html.TextBoxFor(model => model.User.MiddleName, new { #class = "form-control col-md-7 col-xs-12" })
</div>
</div>
<div class="form-group">
#Html.LabelFor(model => model.User.UserName, new { #class = "control-label col-md-3 col-sm-3 col-xs-12" })
<div class="col-md-8 col-sm-6 col-xs-12">
#Html.TextBoxFor(model => model.User.UserName, new { #class = "form-control col-md-7 col-xs-12" })
</div>
</div>
<div class="form-group">
#Html.LabelFor(model => model.User.Email, new { #class = "control-label col-md-3 col-sm-3 col-xs-12" })
<div class="col-md-8 col-sm-6 col-xs-12">
#Html.TextBoxFor(model => model.User.Email, new { #class = "form-control col-md-7 col-xs-12" })
</div>
</div>
<div class="form-group">
#Html.LabelFor(model => model.User.Phone, new { #class = "control-label col-md-3 col-sm-3 col-xs-12" })
<div class="col-md-8 col-sm-6 col-xs-12">
#Html.TextBoxFor(model => model.User.Phone, new { #class = "form-control col-md-7 col-xs-12" })
</div>
</div>
<div class="form-group">
#Html.LabelFor(model => model.User.RoleId, new { #class = "control-label col-md-3 col-sm-3 col-xs-12" })
<div class="col-md-8 col-sm-6 col-xs-12">
#Html.DropDownListFor(model => model.User.RoleId, new SelectList(Model.Roles, "Id", "RoleName"), htmlAttributes: new { #class = "form-control col-md-7 col-xs-12", id = "roles" })
</div>
</div>
<div class="form-group">
#Html.LabelFor(model => model.User.Note, new { #class = "control-label col-md-3 col-sm-3 col-xs-12" })
<div class="col-md-8 col-sm-6 col-xs-12">
#Html.TextAreaFor(model => model.User.Note, new { #class = "form-control col-md-7 col-xs-12" , style = "min-height:100px !important" })
</div>
</div>
</div>
#Html.HiddenFor(m => m.User.Id)
#Html.HiddenFor(m => m.User.CreateDate)
#Html.HiddenFor(m => m.User.Status)
#Html.HiddenFor(m => m.User.Password)
<div class="col-sm-12 text-center" style="padding-bottom:3px">
<button class="btn btn-default">Yadda Saxla</button>
İmtina
</div>
}
UserController:
public ActionResult Update(int userId)
{
UserViewModel employeeViewModel = new UserViewModel
{
User = _userService.GetUser(userId),
Roles = _userService.GetRoles()
};
return View(employeeViewModel);
}
[HttpPost]
public ActionResult Update(UserViewModel userViewModel)
{
User user = new User();
user.Id = userViewModel.User.Id;
user.RoleId = userViewModel.User.RoleId;
user.UserName = userViewModel.User.UserName;
user.FirstName = userViewModel.User.FirstName;
user.LastName = userViewModel.User.LastName;
user.MiddleName = userViewModel.User.MiddleName;
user.Email = userViewModel.User.Email;
user.Phone = userViewModel.User.Phone;
user.Note = userViewModel.User.Note;
user.Status = userViewModel.User.Status;
if (userViewModel.User.Id == 0) user.CreateDate = DateTime.Now;
else user.CreateDate = userViewModel.User.CreateDate;
_userService.UpdateEmployee(user);
return RedirectToAction("Index");
}
Can do reference issue from Visual Studio?
Because when I remove
<input type="file" name="file" id="file1" />
This section project worked good.
I think the problem is in another place that is not in the code
I already added multipart/form-data for File upload..
Please help me to fix this error..

Passing Model to the partial view doesn't work

The file "Add.cshtml" is calling the partial view "_ManagePartial.cshtml" and passing the "Model""however the "Model " is not being picked up in the partial view.
When I include the code that's on the partial view into "Add.cshtml" everything works great.
Please advise what I''m doing wrong.
Error Message:
Click here to see the error message screenshot
File: _ManagePartial.cshtml
<div class="row">
<div class="col-md-4">
<div class="form-group">
#Html.LabelFor(model => model.UserName)
#Html.EditorFor(model => model.UserName, new { htmlAttributes = new { #class = "form-control input-lg" } })
#Html.ValidationMessageFor(model => model.UserName, "", new { #class = "text-danger" })
</div>
<div class="form-group">
#Html.LabelFor(model => model.UserPassword)
#Html.EditorFor(model => model.UserPassword, new { htmlAttributes = new { #class = "form-control input-lg" } })
#Html.ValidationMessageFor(model => model.UserPassword, "", new { #class = "text-danger" })
</div>
<div class="form-group"><button type="submit" class="btn btn-primary btn-lg">Submit</button></div>
</div>
<div class="col-md-4">
<div class="form-group">
#Html.LabelFor(model => model.UserEmail)
#Html.EditorFor(model => model.UserEmail, new { htmlAttributes = new { #class = "form-control input-lg" } })
#Html.ValidationMessageFor(model => model.UserEmail, "", new { #class = "text-danger" })
</div>
<div class="form-group">
#Html.LabelFor(model => model.UserConfirmPassword)
<input type="password" class="form-control input-lg" name="UserConfirmPassword">
</div>
</div>
</div>
File: Add.cshtml
#model CardDistro.Models.AddUserViewModel
#{
ViewBag.Current = "Users#Index";
String Action = ViewBag.FormAction;
}
<h2 class="page-header">#ViewBag.Title</h2>
#using (Html.BeginForm(Action, "Users", FormMethod.Post, new { id = "SiteAddUserContainer" }))
{
<input type="hidden" name="UserID" value="#Model.UserID" />
if (ViewBag.Retval != null){
<div class="row"><div class="col-md-8"><div class="alert alert-danger">#ViewBag.Retval</div></div></div>
}
Html.RenderPartial("_ManagePartial", Model);
}
_ManagePartial.cshtml needs to identify the model by starting the partial view with
#model CardDistro.Models.AddUserViewModel
so the compiler knows what to do with model=>UserName

how to show validation summary with asterisk in mvc?

In this Form used validation summary for errors.
View:-
<div class="col-md-12 table-bordered" style="padding: 20px; margin:10px;">
<div class="col-md-12">#Html.ValidationSummary(false,"Please Correct Following details :", new { #class = "text-danger" })</div>
<div class="col-md-12" style="padding:10px;">
<div class="col-md-6">
<div style="width:95%;">
#Html.LabelFor(Model => Model.ItemName, new { style = "font-weight:bold;", #maxlength = "100" })
#Html.TextBoxFor(Model => Model.ItemName)
<span class="text-danger"> #Html.ValidationMessageFor(Model => Model.ItemName) </span>
</div>
</div>
<div class="col-md-6">
<div style="width:75%;">
#Html.LabelFor(Model => Model.ActiveProductGroup, new { style = "font-weight:bold;" })
#Html.DropDownListFor(Model => Model.ProductGroupID, new SelectList(ViewBag.ActiveProductGroup, "Value", "Text"), "--Select Value--", new { style = "Width:95%" })
<span class="text-danger"> #Html.ValidationMessageFor(Model => Model.ActiveProductGroup) </span>
</div>
</div>
</div>
<div class="col-md-12" style="padding:10px;">
<div class="col-md-3">
<div style="width:70%;">
#Html.LabelFor(Model => Model.SequenceNumber, new { style = "font-weight:bold;" })
#Html.TextBoxFor(Model => Model.SequenceNumber, new { style = "text-align:right", #maxlength = "3" })
<span class="text-danger"> #Html.ValidationMessageFor(Model => Model.SequenceNumber) </span>
</div>
</div>
<div class="col-md-3">
<div style="width:50%;">
#Html.LabelFor(Model => Model.UnitPrice, new { style = "font-weight:bold;" })
#Html.TextBoxFor(Model => Model.UnitPrice, new { style = "text-align:right", #maxlength = "5" })
<span class="text-danger"> #Html.ValidationMessageFor(Model => Model.UnitPrice) </span>
</div>
</div>
<div class="col-md-3">
<div style="width:50%;">
#Html.LabelFor(Model => Model.Quantity, new { style = "font-weight:bold;" })
#Html.TextBoxFor(Model => Model.Quantity, new { style = "text-align:right", #maxlength = "5" })
<span class="text-danger"> #Html.ValidationMessageFor(Model => Model.Quantity) </span>
</div>
</div>
<div class="col-md-3">
<div style="width:80%;">
#Html.LabelFor(Model => Model.EstimatedDeliveryDays, new { style = "font-weight:bold;" })
#Html.TextBoxFor(Model => Model.EstimatedDeliveryDays, new { style = "text-align:right", #maxlength = "2" })
<span class="text-danger"> #Html.ValidationMessageFor(Model => Model.EstimatedDeliveryDays) </span>
</div>
</div>
</div>
</div>
In this used html.validation summary
In this Form it should show asterisk (*) sign below textbox and error in validation summary
how to achieve it?
Can't you use the Required attribute in your model?
Example:
public class ClassName{
[Required(ErrorMessage = "* Please enter Item Name")]
public string ItemName {get;set;}
}

MVC Form Validation Thrown to All Forms in Page

so i have this view with multiple same form like this
<div class="col-md-5">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Special Leave on Purposes Rules</h3>
</div>
<div class="panel-body">
#using (Html.BeginForm("Rule", "Admin", FormMethod.Post, new { #class = "form-horizontal", placeholder = ViewBag.maternity }))
{
<div class="form-group">
<label for="inputEmail3" class="col-sm-4 control-label">Set Max For</label>
<div class="col-sm-8">
#Html.DropDownListFor(
model => model.ID, (SelectList)ViewBag.special,
"--Select One--",
new
{ //anonymous type
#class = "form-control input-sm",
id= "inputEmail3"
})
</div>
#Html.ValidationMessageFor(m => m.ID, null, new { #class = "text-danger" })
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-4 control-label">Set Max</label>
<div class="col-sm-8">
#Html.TextBoxFor(model => model.Max, new { #Class = "form-control" })
</div>
#Html.ValidationMessageFor(m => m.Max, null, new { #class = "text-danger" })
</div>
<div class="form-group">
<button type="submit" class="btn btn-success">Save</button>
</div>
}
</div>
</div>
</div>
<div class="col-md-5">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Maternity Leave Rules</h3>
</div>
<div class="panel-body">
#using (Html.BeginForm("Rule", "Admin", FormMethod.Post, new { #class = "form-horizontal" }))
{
<div class="form-group">
<label for="inputEmail3" class="col-sm-4 control-label">Maximum Leave</label>
<div class="col-sm-8">
<div class="input-group">
#Html.TextBoxFor(model => model.Max, new { #Class = "form-control", placeholder = ViewBag.maternity })
<span class="input-group-addon">In Row</span>
#Html.HiddenFor(model => model.ID, new { Value = 2 })
</div>
</div>
#Html.ValidationMessageFor(m => m.Max, null, new { #class = "text-danger" })
</div>
<div class="form-group">
<button type="submit" name="submit" value="Annual" class="btn btn-success">Save</button>
</div>
}
</div>
</div>
</div>
The problem here is that when the form submitted with wrong value, the modelstate validated and return error message for ALL of the form like in this picture.
I want that the error message is only shown for the form i submit, is that possible? Thanks for your help guys

Html.ActionLink doesn't call at all

I am having some problems solving this. The thing is, this is the only place it doesn't work, everywhere else in my project it works just fine and it's all the same.
here is my link:
<td class="col-sm-1 col-lg-1">#Html.ActionLink("Edit", "EditGrowWeek", "FinishedProductionMaintanance", new { #id = Model.growWeek.GWID }, new { #data_toggle = "modal", #data_target = "#editGrowWeek" })</td>
my controller:
[HttpGet]
public ActionResult EditGrowWeek(int id)
{
viewModel.growWeek = _ProductionGrowWeekRepository.GetOne(id);
return PartialView(viewModel);
}
[HttpPost]
//[ValidateAntiForgeryToken]
public ActionResult EditGrowWeek([Bind(Prefix="growWeek")] ProductionGrowWeek growWeek)
{
var growWeeks = _ProductionGrowWeekRepository.GetAll(growWeek.GProfileNo);
foreach (var week in growWeeks)
{
if (ModelState.IsValid)
{
_ProductionGrowWeekRepository.Edit(week);
}
}
return RedirectToAction("IndexGrowProfiles");
}
and finally my view:
#model SISCOM.ViewModel.FinishedProductionMaintananceViewModel
#{
Layout = null;
}
<div class="modal fade in" id="editGrowWeek" tabindex="-1" role="dialog" aria-labelledby="MyModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dissmiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<div class="modal-body">
#using (Html.BeginForm("EditGrowWeek", "FinishedProductionMaintanance", FormMethod.Post))
{
#*#Html.AntiForgeryToken()*#
<form id="form">
#Html.ValidationSummary(true)
#Html.HiddenFor(model => model.growWeek.GWID)
#Html.HiddenFor(model => model.growWeek.CutSupplierCode)
#Html.HiddenFor(model => model.growWeek.DelvyWk)
#Html.HiddenFor(model => model.growWeek.Description_ID_)
#Html.HiddenFor(model => model.growWeek.Description_Product_)
#Html.HiddenFor(model => model.growWeek.Despatch)
#Html.HiddenFor(model => model.growWeek.FinishedDuration)
#Html.HiddenFor(model => model.growWeek.FinishedSite)
#Html.HiddenFor(model => model.growWeek.GapUpHandSite)
#Html.HiddenFor(model => model.growWeek.GapUpMCSite)
#Html.HiddenFor(model => model.growWeek.GerminationDuration)
#Html.HiddenFor(model => model.growWeek.GerminationSite)
#Html.HiddenFor(model => model.growWeek.Germinator)
#Html.HiddenFor(model => model.growWeek.GerminatorDuration)
#Html.HiddenFor(model => model.growWeek.GerminatorSite)
#Html.HiddenFor(model => model.growWeek.GProfileNo)
#Html.HiddenFor(model => model.growWeek.GrowWks1)
#Html.HiddenFor(model => model.growWeek.GrowWks2)
#Html.HiddenFor(model => model.growWeek.GrowWks3)
#Html.HiddenFor(model => model.growWeek.GrowWks4)
#Html.HiddenFor(model => model.growWeek.GrowWks5)
#Html.HiddenFor(model => model.growWeek.OrderWK)
#Html.HiddenFor(model => model.growWeek.PreGapDuration)
#Html.HiddenFor(model => model.growWeek.PreGapSite)
#Html.HiddenFor(model => model.growWeek.PrickOut)
#Html.HiddenFor(model => model.growWeek.PrickOutSite)
#Html.HiddenFor(model => model.growWeek.Priority)
#Html.HiddenFor(model => model.growWeek.ProdGrp)
#Html.HiddenFor(model => model.growWeek.ProdSeries)
#Html.HiddenFor(model => model.growWeek.ProdSeriesDetail)
#Html.HiddenFor(model => model.growWeek.ProductionGrowProfile)
#Html.HiddenFor(model => model.growWeek.RangeUpdateFlag)
#Html.HiddenFor(model => model.growWeek.Rooting_GermAssess)
#Html.HiddenFor(model => model.growWeek.SiteGrown)
#Html.HiddenFor(model => model.growWeek.SiteRange)
#Html.HiddenFor(model => model.growWeek.SiteSown)
#Html.HiddenFor(model => model.growWeek.Topping)
#Html.HiddenFor(model => model.growWeek.ToppingCode)
#Html.HiddenFor(model => model.growWeek.Transplant)
<div class="form-group">
<div class="editor-label">
#Html.LabelFor(p => p.growWeek.WksToDesp, "Weeks to despatch")
</div>
<div class="editor-field">
#Html.TextBoxFor(p => p.growWeek.WksToDesp, null, new { #class = "form-control", #placeholder = "Weeks to despatch" })
#Html.ValidationMessageFor(p => p.growWeek.WksToDesp, "", new { #class = "text-danger" })
</div>
</div>
<div class="form-group">
<div class="editor-label">
#Html.LabelFor(p => p.growWeek.GapUp, "Gap up")
</div>
<div class="editor-field">
#Html.TextBoxFor(p => p.growWeek.GapUp, null, new { #class = "form-control", #placeholder = "Gap up" })
#Html.ValidationMessageFor(p => p.growWeek.GapUp, "", new { #class = "text-danger" })
</div>
</div>
<div class="form-group">
<div class="editor-label">
#Html.LabelFor(p => p.growWeek.Pinch1, "Pinch1")
</div>
<div class="editor-field">
#Html.TextBoxFor(p => p.growWeek.Pinch1, null, new { #class = "form-control", #placeholder = "Pinch1" })
#Html.ValidationMessageFor(p => p.growWeek.Pinch1, "", new { #class = "text-danger" })
</div>
</div>
<div class="form-group">
<div class="editor-label">
#Html.LabelFor(p => p.growWeek.Pinch2, "Pinch2")
</div>
<div class="editor-field">
#Html.TextBoxFor(p => p.growWeek.Pinch2, null, new { #class = "form-control", #placeholder = "Pinch2" })
#Html.ValidationMessageFor(p => p.growWeek.Pinch2, "", new { #class = "text-danger" })
</div>
</div>
<div class="form-group">
<div class="editor-label">
#Html.LabelFor(p => p.growWeek.Space1, "Space1")
</div>
<div class="editor-field">
#Html.TextBoxFor(p => p.growWeek.Space1, null, new { #class = "form-control", #placeholder = "Space1" })
#Html.ValidationMessageFor(p => p.growWeek.Space1, "", new { #class = "text-danger" })
</div>
</div>
<div class="form-group">
<div class="editor-label">
#Html.LabelFor(p => p.growWeek.Space2, "Space2")
</div>
<div class="editor-field">
#Html.TextBoxFor(p => p.growWeek.Space2, null, new { #class = "form-control", #placeholder = "Space2" })
#Html.ValidationMessageFor(p => p.growWeek.Space2, "", new { #class = "text-danger" })
</div>
</div>
<div class="form-group">
<div class="editor-label">
#Html.LabelFor(p => p.growWeek.Space3, "Space3")
</div>
<div class="editor-field">
#Html.TextBoxFor(p => p.growWeek.Space3, null, new { #class = "form-control", #placeholder = "Space3" })
#Html.ValidationMessageFor(p => p.growWeek.Space3, "", new { #class = "text-danger" })
</div>
</div>
<div class="form-group">
<div class="editor-label">
#Html.LabelFor(p => p.growWeek.Check1, "Check1")
</div>
<div class="editor-field">
#Html.TextBoxFor(p => p.growWeek.Check1, null, new { #class = "form-control", #placeholder = "Check1" })
#Html.ValidationMessageFor(p => p.growWeek.Check1, "", new { #class = "text-danger" })
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Edit" class="btn btn-default" />
</div>
</div>
</form>
}
</div>
</div>
</div>
</div>
I've been checking everywhere and this one doesn't make a call at all... any ideeas?
P.S. ... this might be connected so, on this page, (On the index that renders this partial) my footer is being rendered somewhere in the middle of my page in code..
This doesn't make a lot of sense but here it is. The problem was that everytime i generated values for that table it removed the partial view following it for some reason (if anyone can make sense of this behaviour and can explain please do.)
so, my index for this page used to look like this:
<div class="tab-content col-md-9 col-lg-9 growProfilePage">
<div class="col-md-12 col-lg-12">
<div class="col-md-4">
#{ Html.RenderPartial("ListGrowProfiles");}
</div>
<div class="col-md-8">
#{ Html.RenderPartial("ListGrowWeeks");}
#{ Html.RenderPartial("EditGrowWeek");}
</div>
</div>
</div>
now it looks like this:
<div class="tab-content col-md-9 col-lg-9 growProfilePage">
<div class="col-md-12 col-lg-12">
#{ Html.RenderPartial("EditGrowWeek");}
<div class="col-md-4">
#{ Html.RenderPartial("ListGrowProfiles");}
</div>
<div class="col-md-8">
#{ Html.RenderPartial("ListGrowWeeks");}
</div>
</div>
</div>
and it all works (curiously enough, on other pages it's still like before, the edit following the list and it works like that).

Resources