This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MaximumWeightAttribute : ValidationAttribute, IClientValidatable { | |
private const string ERRORMSG = "Weight must not exceed {0} lbs."; | |
public string DependentProperty { get; set; } | |
public string DependentValue { get; set; } | |
public int MaximumWeight { get; set; } | |
public MaximumWeightAttribute(string dependentProperty, string dependentValue, int maximumWeight) { | |
this.DependentProperty = dependentProperty; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@helper DynamicDropDowns() { | |
<script type="text/javascript"> | |
function listChanged($list, $target, url) { | |
var listId = $list.val(); | |
if (listId == "") { // User selected first option, so clear and disable the list | |
$target.empty(); | |
enableList($target, false); | |
return; | |
} | |
$.getJSON(url, { id: listId }, function (data) { |
NewerOlder