c# Asp .Net Ajax send String
I have problem with passing parameters beteen view a controller.
I send serialized class to string as parameter in ajax.BeginForm, and i got error 414 (Request-URI Too Long) .
Serialize of procedure works correectly, i have use it on another functions of applications.
I try to set
<system.web>
<httpRuntime maxRequestLength = "1048576" enable="true" />
</system.web>
and
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxQueryString="1073741824" maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>
bat still i got error with message '414 Uri Url is too long'
below is a part of code Views:
@using (Ajax.BeginForm("Update", "Table", new { data = Model.Serialize() },
new AjaxOptions() {UpdateTargetId = "TableId", HttpMethod = "Post", OnSuccess = "TestOnSukcess" },
new { contentType = "application/json"}))
{
...
}
Controller:
public class TableController : Controller
{
public void Update(Record arg, String data = null)
{
...
}
}
error show in chrome browser after posting ajax form and call controller method (Update), where i do mistake?
For example serialized class have a 16844 lengths.
Sorry for my bad English :c
链接地址: http://www.djcxy.com/p/42122.html上一篇: TDD测试重构以支持多线程
下一篇: c#Asp .Net Ajax发送字符串