Posts by Victor Laio • 2,043 points
107 posts
-
4
votes1
answer81
viewsQ: Dispose() - Resource Release or Memory Release?
After seeing the topic "I should always use Dispose?", I still had some doubts and would like to know more about. It’s no secret that it’s ideal to use the Using statement for objects Idisposable,…
c#asked Victor Laio 2,043 -
1
votes1
answer55
viewsQ: Getproperties() except Notmapped
I have a method that searches all the properties of my model, but I would not like to bring the entities that have as DataAnnotation the attribute NotMapped. Method private IEnumerable<string>…
-
1
votes0
answers1657
viewsQ: Reader of Qrcode Javascript
I’m using the QR Scanner to try to read QR codes through device cameras mobile, however the device’s camera is detected but does not show any camera image in the application. Device has camera: true…
-
1
votes2
answers79
viewsA: Detecting if a Setter of a property has been called
Good morning buddy, I’ve been giving a thought and the way I found it was to make a property that will store these changes and a method to record this information on Set of each property. public…
-
0
votes2
answers44
viewsA: Reduce operation
Since you want to do this from a certain amount the ideal would be to use the repeating structure for: var i; for (i = 0; i < 2; i++) { buttonsYv[i].removeAttribute('class'); }…
javascriptanswered Victor Laio 2,043 -
8
votes2
answers244
viewsA: What is a heuristic?
A heuristic is a technique that improves demand efficiency. The word originates from the Greek "Heuriskein" which means to discover, also originated from Eureka which comes from the expression…
-
3
votes1
answer718
viewsQ: Difference between Ahead-Of-Time and Just-in-Time compilation
While you were reading about templates for ASP.NET I saw that one had support for AOT (Ahead of Time) and the other said nothing. I have been researching on the subject and I could not understand…
-
0
votes1
answer44
viewsA: Problem in Form with Ajax and Codeigniter
Replace your script with this: <script> $("#estados").on("change",function() { var idEstado = $(this).val(); alert(idEstado); }); </script> Some examples: insert link description here…
-
0
votes1
answer112
viewsA: Knowing Modelstate in javascript dynamically
First you have to understand that your code printing View (Html, css, javascript...) and rendering the code Razor (Which is a View Engine in the ASP.NET) is made at the moment when the request of…
-
2
votes2
answers1079
viewsA: Event loading when conducting queries in AJAX with ASP.NET MVC
You can do as I did on my application: First I created a modal with a simple CSS of a running image and a loading message: <div class="processandoMensagem"> <div…
-
2
votes1
answer51
viewsA: Purpose of Jquery in php
The JQuery has no purpose especially for PHP, can be worked with other languages in the same way. It’s a library JavaScript resource-rich for rapid page and document development HTML it is possible…
phpanswered Victor Laio 2,043 -
1
votes2
answers799
viewsA: Read multiple text files using System.IO and Visual C# . NET and writing to these files
So, first of all you wouldn’t need to declare Dispose() inside your block usingbecause the use of using allows classes that implement Idisposable are used in such a way as to ensure the execution of…
-
2
votes2
answers43
viewsA: verify that Radiobutton with Repeatdirection, generated in Datagrid are checked
You can do it this way: bool todosOpcaoSim = true; foreach (DataGridItem dtR in dgRegistros.Items) { RadioButtonList radio =…
-
1
votes1
answer37
viewsA: Pick up DIV through a custom attribute
I just needed to define the type of element I want to bring and my custom attribute between brackets: console.log($('div[ordained-field]')) I also found a search through a custom attribute with…
-
1
votes1
answer37
viewsQ: Pick up DIV through a custom attribute
I have several DIVs as the code below. <div class="col-md-10" ordained-field="0"></div> How do I get them all by the attribute I created ordained-field…
-
0
votes0
answers301
viewsQ: Pool of ASP.net MVC apps stopping alone
I have an app ASP.NET MVC that is rotating on top of the IIS in version 10.0. When there are multiple simultaneous connections (3~5 connections) it simply to the application pool presenting the…
-
5
votes3
answers1590
viewsQ: Check that all fields of an entity is null
I’m doing a verification of an entity view model in the C# and I have to validate if all fields are null, because I have to require at least 1 filter to continue the routine. Doubt: What better…
c#asked Victor Laio 2,043 -
4
votes1
answer898
viewsQ: Server cannot attach a header after HTTP headers have been sent
Good morning, I have the following code that I use to compress the controllers using the GZip. I log in to the system normally, but if I try to change registered company the following error is…
-
1
votes2
answers646
viewsA: Select folder in directory in input
Unable to select a website folder using HTML native + JS. You can only select a file or list of files to upload, but not a folder itself. Usually you won’t even be able to see the original file path…
asp.net-mvcanswered Victor Laio 2,043 -
0
votes1
answer112
viewsA: Create new directory according to string
Check if the directory that is trying to save the image exists: if (!System.IO.Directory.Exists(SaveLocation)) System.IO.Directory.CreateDirectory(SaveLocation) file.SaveAs(SaveLocation);…
-
0
votes1
answer81
viewsQ: Exchange Html.Action() for an Ajax request
I have a method that returns a ActionResult called through a Html.Action() directly on View using Razor. This method is used to render a ComboBox of devExpress with the data I send a command SQL at…
-
1
votes1
answer76
viewsA: ASP.Net - Javascript file compression / Text Gzip
I found the solution by changing the applicationHost.config belonging to the project that is under development. Original text Applicationhost.config is the root file of the Configuration system when…
-
1
votes1
answer76
viewsQ: ASP.Net - Javascript file compression / Text Gzip
Good afternoon, I’m having a hard time configuring traffic compression using the GZip. Below are the steps I have already taken to effect compression: I’ve already enabled windows features related…
-
5
votes1
answer159
viewsQ: How to use methods contracts and why?
Reading a book on development . NET, I saw a brief description about methods Contracts and tried to know a little more on the internet. It uses an imperative syntax that is costly and has low tool…
-
0
votes1
answer25
viewsA: Glimpse ASP.Net working with Dapper
Well, I ended up using the LightHouse from Google, ended up meeting my expectations. Below a little more about Lighthouse which is basically a diagnostic tool also The Lighthouse is an automated…
-
1
votes1
answer74
viewsA: Merge executable c#
Good morning buddy, It’s simple, create an application that first runs the Mongodb configurator, using the WaitForExit(). Soon after you can run the Management Software installer. It follows the…
-
0
votes1
answer307
viewsA: Calling a Modal via Html.Actionlink
I recommend calling an Action in your controller through a . js method where it will return to your View() with your model: public ActionResult RetornarModal() { return PartialView("_Partial",…
-
0
votes2
answers725
viewsA: Load BLOB to Image C# Mysql
string base64string = info.GetString(6); byte[] blobImage = Convert.FromBase64String(base64string); using (MemoryStream ms = new…
-
3
votes2
answers293
viewsQ: How to make a switch in C#?
I see a lot of people saying it’s wrong to do switch in the code, because it ends up weighing and is ugly. Is it correct the way I am using and what would be an alternative to using it? Fill the…
-
0
votes2
answers107
viewsA: How to clear multiple input fields by classes?
From what you can see by your code you’re using the function .val(), then it should probably be Jquery Just search for your input and use val(). $('.class1').val('') To take several at once and…
inputanswered Victor Laio 2,043 -
1
votes1
answer144
viewsQ: Output Cache ASP . Net MVC
I am studying on the output cache in Asp . NET MVC to improve the performance of my application. From what I’ve seen it can be stored in many places like: · Any · Client · Downstream · Server · None…
-
0
votes1
answer34
viewsA: Go adding for values in the array
Use the command push() to add a new item in array: tagListArray.push("String"); If it is an object list you can use it the same way: tagListArray.push({ ID: 1, Nome: "Valor 1" });…
-
0
votes1
answer25
viewsQ: Glimpse ASP.Net working with Dapper
I just saw a piece of content where I studied performance and optimization in ASP.Net applications. I was presented with a diagnostic tool called Glimpse. The operation of the tool is perfect, it…
-
0
votes1
answer76
viewsA: Model list arrives outdated in controller - Asp.Net mvc
The values are going pro model outdated because in the assembly of the page code by Razor is being passed on model from that moment (With initial values). To send them to the controller via the…
-
1
votes1
answer70
viewsA: How to pass a parameter together with the Model to a Partialview when rendering it
Change: @await Html.PartialAsync("_Contato", Model.PessoasContatosViewModel[i], new ViewDataDictionary { { "indice", i } }) For: @await Html.PartialAsync("_Contato",…
-
1
votes2
answers83
viewsA: Line break in a function
In fact the <p> is for paragraphs, the <br>would be for line breaks. But anyway, let’s go to your code: function EE(texto,ClassElemento,tempo){ var char = texto.split('').reverse(); var…
javascriptanswered Victor Laio 2,043 -
1
votes1
answer182
viewsA: Limit amount of SQL information
Natively this is not possible friend, I’ll give you 2 possible solutions. To first you can create a trigger that checks the amount of records and after that makes the insertion in the database. To…
-
1
votes1
answer87
viewsA: I cannot receive the view parameter in the controller
The submit will send all information inside the form, and note that in your code Submit is outside the form that contains the fields. I advise to put your fields as in the following example: @using…
-
0
votes2
answers226
viewsA: How to Insert a parameter from my system into an external URL
In a very simple way it can be done directly in Javascript (You can change the method to receive the id parameter if necessary too.): function AbrirUrl() { var url =…
-
0
votes1
answer33
viewsA: How to update the Index of a field using Javascript in Asp.net MVC
I thought I’d get all the elements validation of the page and for each change the name of them according to the index. This way if you have other validation fields on the screen you will have to…
-
0
votes1
answer58
viewsQ: What is the difference between these two types of standard values?
In C#, by creating a classe new with some properties, I should set some default value for the properties created, 0 in the case of a property of Saldoatual. What would be the difference between the…
c#asked Victor Laio 2,043 -
1
votes1
answer311
viewsA: Filter jquery list with checkbox
First you should add one input Hidden in its lines to pull this value directly into the filter containing the value of its Product Type (Inside its for even): @foreach (var item in Model.Produto) {…
-
3
votes3
answers887
viewsA: Limit Value of Input
You can use the addEventListener(), from there you can take the value and make the check: INPUT_OBJECT.addEventListener('input', function (evento) { alert(this.value); }); Any doubt I’m available!…
-
1
votes2
answers294
viewsA: Stopwatch using Javascript
I just entered a boolean control in the code to identify whether it finished the process or not, creating the variable done. This variable is always checked at the beginning of the counter. var…
-
2
votes2
answers682
viewsA: Extract XML C#tags
You can create a class containing the properties of your object and then use the class of Deserialize where it will take the XML information and convert directly to your object. This way your code…
-
2
votes1
answer39
viewsA: How to Create a filter between two dropdowns using jquery
It would be nice if you sent a request for your application to return the second list in the first list change event. Do so: $("#PRIMEIRO_COMBOBOX").on('change', function(){ $.ajax({ type: method,…
-
0
votes1
answer57
viewsA: Enable field when page loading if input is filled with specific word
Add this within the function window.onload: var campoRG = document.getElementById('SEU_CAMPO_RG').value; var display = campoRG.length > 0 ? 'block' : 'none';…
-
0
votes1
answer268
viewsA: Binding a checkbox with Viewmodel without the use of Razor (Asp.net core MVC)
You should put a property for it checked or not, because it identifies the changes as if it were an event "on". Add this part to your checkbox: value="true" checked As you mentioned, you can try…
-
0
votes1
answer199
viewsA: Submit the form within a modal view redirects me to the view page
You can direct the post on your page by telling where it goes when you give Ubmit. @Html.BeginForm("YOUR_ACTION_NAME", "YOUR_CONTROLLER_NAME", FORM_METHOD) This method has several overloads, but…
-
0
votes1
answer175
viewsA: Name property does not work using Razor Hiddenfor
Try it like this: <input type="hidden" asp-for="Id" name="PessoasContatosViewModel[@indice].Id" />…