BoldDesk®Customer service software with ticketing, live chat & omnichannel support, starting at $99/mo for unlimited agents. Try for free!
public class CalculatorModel { public int Result { get; set; } public int FirstOperand { get; set; } public int SecondOperand { get; set; } }I have create the following Controller:
public class CalculatorController : Controller { [HttpGet] public ActionResult Sum() { CalculatorModel model = new CalculatorModel(); model.FirstOperand = 100; model.SecondOperand = 200; return View(model); } [HttpPost] public ActionResult Sum(CalculatorModel model) { model.Result = model.FirstOperand + model.SecondOperand; ViewBag.Result = model.Result.ToString(); return View(model); } }Now I have two problems:
and I have following View:
@model SyncfusionMobileMvcTestApp.Models.CalculatorModel @{ ViewBag.Title = "Sum"; } <h2>Sum</h2> @using (Html.BeginForm()) { <table border="0" cellpadding="3" cellspacing="1" width="100%"> <tr valign="top"> <td> @Html.LabelFor(model => model.FirstOperand) @{ Html.MobSyncfusion().NumericTextBoxFor(model => model.FirstOperand).ShowSpinButton(true).RenderMode(RenderMode.Auto).Render(); } </td> </tr> <tr valign="top"> <td> @Html.LabelFor(model => model.SecondOperand) @{ Html.MobSyncfusion().NumericTextBoxFor(model => model.SecondOperand).ShowSpinButton(true).RenderMode(RenderMode.Auto).Render(); } </td> </tr> <tr valign="top"> <td> @Html.LabelFor(model => model.Result) @{ Html.MobSyncfusion().NumericTextBoxFor(model => model.Result).ShowSpinButton(true).RenderMode(RenderMode.Auto).Render(); } </td> </tr> </table> <div style="text-align:right;"> <input type="submit" id="btnSum" value="Sum values" /> </div> }
Hi Frank,
Thanks for your interest in Mobile MVC product.
The reported behavior is the mvc’s default behavior. You have to use ModelState.Clear() in your controller method to make the html helpers to use your updated model. Otherwise they will use the values from the form submit. We have also done the same in sample for your reference and attached.
Please try this and let us know if it helps.
Regards,
Thivya.
We have gone through the screenshot you sent. On seeing that
we suspect that you are using MVC textbox because the appearance differs from
our Mobile MVC Numeric Textbox. And also we have ensured the sample which we
sent to you in previous update. But we are not able to reproduce the mentioned
issue. We are getting the resultant output properly after the popup gets hide.
Please find the output screenshot in the attachment.
Please ensure whether you are using our Mobile MVC Numeric textbox
or not, if you still facing issue then could you please send the sample and let
us know the browser version you using. So that we could find out the cause of
the issue and help you further.
Hi Frank,
Please find the response for your queries.
Regarding ‘NaN issue:
We afraid that we are not able to reproduce the issue. We have ensured the sample which you sent but its working fine and its displaying the initial value and resultant value properly. Could you please share the OS information, .Net version, MVC version and browser details with us so that we could sort out the root cause of the issue. The information you provide will be great helpful for us to assist you further.
Regarding deployed sample:
We have checked the given link. We suspect that you could have missed to include AjaxMin dll in the bin folder. So, please copy AjaxMin.dll to your bin folder of the application to resolve the reported issue. This Ajax.Min.dll is already shipped with the build, you can find the dll in the below location.
C:\Program Files (x86)\Syncfusion\Orubase Studio\1.1.0.69\Assemblies\4.0
By default, the StyleManager enables minification, compression and combination of CSS resources, hence this ajaxmin dll is required in the deployment. Also, we have added this reference details in the Online Documentation. Please refer to the following link.
http://help.syncfusion.com/UG/orubase/Documents/dlllist.htm
Please let us know if you have any queries.
Regards,
Thivya.
Hi Frank,
We regret for the inconvenience.
Now, we are able to reproduce the "NAN" issue. On our further analysis we found that the issue occurs because of localization, so we have confirmed this as a defect. We will fix this issue and it will be available in our Orubase 2 release which is tentatively scheduled to be release on mid of May 2013. We will let you know once the release rolled out successfully.
Regards,
Thivya.
Hi Frank,
We are glad to announce that our Essential Studio Vol 2 2013 is rolled out and is available for download under the following link.
We regret that the Orubase release has been postponed to end of June, 2013. But the mentioned localization issue in Numeric textbox has been fixed and is available in Mobile MVC.
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Regards,
Thivya.