Posts by Jean Gatto • 99 points
8 posts
-
0
votes1
answer504
viewsA: ASP NET MVC - "CORS" ERROR
In Global.asax, enter the header in the "Application_presendrequestheaders" protected void Application_PreSendRequestHeaders() { this.Context.Response.Headers.Add("Access-Control-Allow-Headers",…
-
0
votes2
answers305
viewsA: Validationresult with two parameters
public static class DataAnnotationsValidatorExtension { public static bool Validate<T>(T instance, out List<ValidationResult> validationResults) where T : class { validationResults = new…
-
1
votes2
answers43
viewsA: from Javascript to jQuery
How about testing the parameter value to see if it is null/empty: function writeTotal(value) { var innerHtml = ""; if (value === window.undefined || value === null || value === "") { innerHtml = "R$…
-
0
votes1
answer52
viewsA: run Function even if input is disable - Jquery -javascript
I made a small solution with jQuery to help you, it is not necessary to block the submit button, follow the code below: $(function () { var $form = $("#ID_FORMULARIO"), $ckTermosDeUso =…
-
1
votes1
answer73
viewsA: Return data from the Customer
You must use the Include (EF Join) if option Lazyloading is set to false, otherwise it will automatically do the Joins. Follow the example below: var result = await…
-
1
votes1
answer156
viewsA: Error showing accent words in View
Did you happen to inform on web.config and HTML the type of language? Highly recommended in HTML: <meta charset="utf-8" /> <meta name="language" content="pt-br" /> <meta…
-
2
votes1
answer85
viewsA: how to change a column and primary key to Identity?
You can change via command or via Management Studio. Via command you will have to remove the column and add it again: ALTER TABLE Cliente DROP COLUMN Id ALTER TABLE Cliente ADD ID INT NOT NULL…
databaseanswered Jean Gatto 99 -
0
votes2
answers103
viewsA: Httpstatuscode does not exist code 207, 208 and 226
You can also use the library System Net., it contains an enumerator called Httpstatuscode and you can compare the results instead of using magic numbers. HttpResponseMessage response = await…