Monday 31 December 2012

MVC Validation



 var currentAddress = bingRepository.ToDatabaseAddress(model.CurrentAddress, LocationTypes.Current, out errorString);

//If currentAddress is null and error message value was found, set error in errorstring.then add below lines

                if (!string.IsNullOrEmpty(errorString))
                {
                    string wrongAddressErrorString = errorString;
                    ModelStateDictionary modelState = new ModelStateDictionary();
                    modelState.AddModelError(string.Empty, string.IsNullOrWhiteSpace(wrongAddressErrorString) ? "Not  update error" : wrongAddressErrorString);
                    return false;
                }



1 comment:

If any doubt?then please comment in my post

How to reduce angular CLI build time

 Index: ----- I am using angular cli - 7 and I am going to tell how to reduce the build time as per my knowledge. Problem: -------- Now the ...