I have
@{
var to = Model.PageMeta.TestID == "00" ? "All Tests" : Model.PageMeta.TestID;
}
The value of TestID can be “00”,”01″,”02″ etc
What I would like to do is display this as “All Tests”, “1”, “2” etc. In other words I want to just show the value without the leading zero.
I tried
parseInt(Model.PageMeta.TestID)
but this gave me a compiler error.
Try the
Int32.Parse()method.