forestasphalt
سه شنبه 01 مرداد 1392, 12:45 عصر
با سلام مشکلم اینه موقعی اطلاعات به سرور ارسال میشه مقادیر اون اطلاعات رو در آدرس بار به صورت کوئری استرینگ نشون میده و به متد مورد نظر نیز وارد نمیشود بریک پوینت گذاشتم به نطرتون مشکل از چی میتونه باشه؟
شaxOptions ajaxOption = new AjaxOptions()
{
HttpMethod = "POST",
InsertionMode = InsertionMode.InsertAfter,
LoadingElementId = "Loading",
OnSuccess = "OnSuccess",
OnFailure = "OnFailure"
};
<script src="~/Scripts/jquery-2.0.2.min.js"></script>
<script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
<script type="text/javascript">
function OnSuccess(response) {
alert(response);
}
function OnFailure(response) {
alert("Failure");
}
</script>
@using (Ajax.BeginForm(actionName: "Update", controllerName: "AboutUs", ajaxOptions: ajaxOption))
{
<table style="width: 100%; direction: rtl; padding-right: 40px">
<tr>
<td></td>
<td style="padding-right: 60px">متن درباره ما
</td>
<td>
<div style="width: 600px">
<textarea class="ckeditor" id="AboutContent" name="AboutContent">
</textarea>
</div>
<br />
</td>
</tr>
</table>
<p style="display: none" id="loading"></p>
<div style="text-align: center; font-family: Tahoma">
<input type="submit" style="text-align: center; cursor: pointer; font-family: BYekan,'B Yekan',Tahoma,Arial;" id="btn"
value="ویرایش" />
<p class="status"></p>
</div>
}
[HttpPost]
public virtual void Update()
{
}
شaxOptions ajaxOption = new AjaxOptions()
{
HttpMethod = "POST",
InsertionMode = InsertionMode.InsertAfter,
LoadingElementId = "Loading",
OnSuccess = "OnSuccess",
OnFailure = "OnFailure"
};
<script src="~/Scripts/jquery-2.0.2.min.js"></script>
<script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
<script type="text/javascript">
function OnSuccess(response) {
alert(response);
}
function OnFailure(response) {
alert("Failure");
}
</script>
@using (Ajax.BeginForm(actionName: "Update", controllerName: "AboutUs", ajaxOptions: ajaxOption))
{
<table style="width: 100%; direction: rtl; padding-right: 40px">
<tr>
<td></td>
<td style="padding-right: 60px">متن درباره ما
</td>
<td>
<div style="width: 600px">
<textarea class="ckeditor" id="AboutContent" name="AboutContent">
</textarea>
</div>
<br />
</td>
</tr>
</table>
<p style="display: none" id="loading"></p>
<div style="text-align: center; font-family: Tahoma">
<input type="submit" style="text-align: center; cursor: pointer; font-family: BYekan,'B Yekan',Tahoma,Arial;" id="btn"
value="ویرایش" />
<p class="status"></p>
</div>
}
[HttpPost]
public virtual void Update()
{
}