Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
732 Points
449 Posts
Feb 23, 2012 03:54 PM|LINK
i mean for the code above (http://forums.asp.net/post/4843467.aspx) without javascript, i leave the option 0 (<option value="0">Select</option>).
So, i want to add a ModelState.AddError for this option, if the user leave option 0.
Its something like this example but is not as AsInt, is as AsDecmial
if (Request["employees"].IsInt()) { employeecount = Request["employees"].AsInt(); } else { errors = true; @:Employee count must be a number.<br /> }
dow7
Member
732 Points
449 Posts
Re: How to select data from database using a dropdownlist
Feb 23, 2012 03:54 PM|LINK
i mean for the code above (http://forums.asp.net/post/4843467.aspx) without javascript, i leave the option 0 (<option value="0">Select</option>).
So, i want to add a ModelState.AddError for this option, if the user leave option 0.
Its something like this example but is not as AsInt, is as AsDecmial
if (Request["employees"].IsInt()) { employeecount = Request["employees"].AsInt(); } else { errors = true; @:Employee count must be a number.<br /> }