We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Creating a Numeric TextBox

Thread ID:

Created:

Updated:

Platform:

Replies:

95315 Jul 1,2010 03:39 AM Jul 1,2010 12:07 PM ASP.NET MVC (Classic) 1
loading
Tags: Tools
Dennis Morales
Asked On July 1, 2010 03:39 AM

Hi,

I am creating a numeric textbox model and i cannot assign the model i created in the controller to the Html.NumericTextBox Helper class. It just created a numeric textbox but does not implement the assigned model properties.

I am currently using 8.104.0.30 version.

Thanks

Prem Kumar D [Syncfusion]
Replied On July 1, 2010 12:07 PM

Hi Dennis,

Thanks for using Syncfusion products

With regard to your query, you can follow the code below to set the properties

[Controller]
public ActionResult Index()
{
NumericTextBoxModel myModel = new NumericTextBoxModel();
myModel.MinValue = 10;
myModel.MaxValue = 20;

ViewData["myNumeric"] = myModel;
return View();
}

[ASPX]
<%=Html.NumericTextBox("myNumeric")%>

Note:The id of the Numeric textbox should match with the ViewData key

Please get back to us for any further queries

Regards,
Premkumar D

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;