This question is locked. New answers and comments are not allowed.
Here is my Index.aspx view code:
Here is my Controller code:
Here is the Customer Class:
So what am I doing wrong to databind my model to the NumericTextBox?
Thanks,
Paul
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TelerikMvcApplication1.Models.Customer>" %><asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> Home Page</asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">Numeric Control (data bound):<%: Html.Telerik().NumericTextBoxFor(model => model.CardNumber) %></asp:Content>Here is my Controller code:
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;using Telerik.Web.Mvc;using TelerikMvcApplication1.Models;namespace TelerikMvcApplication1.Controllers{ [HandleError] public class HomeController : Controller { public ActionResult Index() { Customer customer = new Customer(); return View(customer); } }}Here is the Customer Class:
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.ComponentModel;namespace TelerikMvcApplication1.Models{ public class Customer { [DisplayName("Card #")] public long? CardNumber { get; set; } }}So what am I doing wrong to databind my model to the NumericTextBox?
Thanks,
Paul