Answer the question
In order to leave comments, you need to log in
Parameters not being sent via GET ASP.NET MVC?
Good afternoon!
There is a view code
@model Project.Models.Order
@using (Ajax.BeginForm("Update", "OrderLog", null, new AjaxOptions() { HttpMethod = "get", InsertionMode = InsertionMode.Replace, UpdateTargetId = String.Format("order_{0}", Model.ID) }, new { onsubmit = String.Format("show_wait_notification('order_{0}')", Model.ID)}))
{
//Куча HTML
<input name="order_id" type="hidden" value="@(Model.ID)" />
//Куча HTML
}
public ActionResult Update()
{
string key = Request.QueryString["order_id"];
int id;
bool result = int.TryParse(key, out id);
Order order = null;
if (result == true)
{
order = service.Get().Where(o => o.ID == id).FirstOrDefault();
//БИЗНЕС-ЛОГИКА
//....
}
return PartialView(order);
}
Answer the question
In order to leave comments, you need to log in
Abandoned Ajax.BeginForm and implemented via jQuery AJAX Api.
The flight is normal.
But the question is still open.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question