This question is locked. New answers and comments are not allowed.
I've a currency textbox which is binded to model property. The model property is defined as non-nullable decimal
decimal Price { get; set; }
In my view:
decimal Price { get; set; }
In my view:
@(Html.Telerik().CurrencyTextBox() .Name("Price") .Value(Model.Price) .Spinners(false) ) When I am displaying the view first time, the Price textbox by default displaying $0.0. How to display empty textbox when price value is 0.0. I've tried the bewlo code which is giving me "object reference" error.
@ { var temp = Modle.Price == 0 ? (decimal?)null : Model.Price }
And used temp variable to set value to currency textbox.
Thanks in advance