This question is locked. New answers and comments are not allowed.
Hi People, I'm getting an error when I use CurrencyTextBox control. The problem is happened when I write a value higher than Max Value. Here is the code which is included in the view.
<% Html.Telerik().CurrencyTextBoxFor(m => m.Bid.BidAmount)
.MinValue(0)
.MaxValue(922337203685477.5807)
.ButtonTitleUp("Increase Bid")
.ButtonTitleDown("Decrease Bid")
.InputHtmlAttributes(new { @class = "bidValue", @style = "width: 200px" })
.Name("BidAmount")
.Render(); %>
<%= Html.ValidationMessage("BidAmount", "*", new { @style = "color:#ff0000" })%>
So the first Time m.Bid.BidAmount is 922337203685477.6 which is a higher than the Max value. My controller asks if the bidAmount is higher, and if that's correct m.Bid.BidAmount =0, so when it goes back to the view m.Bid.BidAmount is equals 0 , anyway I got an error
"Object Not set an instance of an object". which has not sense, cause the value is 0 which is the MinValue.
I would like to know if there exists some property like MaxLength, which could be helpful for me to avoid user write a value higher than the Max Value
Thanks a lot
<% Html.Telerik().CurrencyTextBoxFor(m => m.Bid.BidAmount)
.MinValue(0)
.MaxValue(922337203685477.5807)
.ButtonTitleUp("Increase Bid")
.ButtonTitleDown("Decrease Bid")
.InputHtmlAttributes(new { @class = "bidValue", @style = "width: 200px" })
.Name("BidAmount")
.Render(); %>
<%= Html.ValidationMessage("BidAmount", "*", new { @style = "color:#ff0000" })%>
So the first Time m.Bid.BidAmount is 922337203685477.6 which is a higher than the Max value. My controller asks if the bidAmount is higher, and if that's correct m.Bid.BidAmount =0, so when it goes back to the view m.Bid.BidAmount is equals 0 , anyway I got an error
"Object Not set an instance of an object". which has not sense, cause the value is 0 which is the MinValue.
I would like to know if there exists some property like MaxLength, which could be helpful for me to avoid user write a value higher than the Max Value
Thanks a lot