Posts by Leandro Angelo • 9,330 points
440 posts
-
0
votes1
answer267
viewsA: C# Windows Forms Calling a Grandchild Form inside a panel in the Grandparent form from the Parent Form
Instead of instantiating frmPrincipal again, you can access it through Parent and locate the control panel. var Principal = this.ParentForm; var pnlContentPrincipal =…
c#answered Leandro Angelo 9,330 -
3
votes2
answers1289
viewsA: How to change the color of an element?
First you must fix your structure, do not repeat id on the elements and link to <label> with the attribute for="". See the example below input[type=radio]:checked+label { background-color:…
-
3
votes1
answer36
viewsA: Modify Displayexpr
You can manipulate your DataSource to popular the component with the information you want. groupItems .AddSimpleFor(m => m.Bcx_codigo) .CssClass("lbcod") .Editor(e =>…
-
2
votes1
answer469
viewsA: How can I "pick up" values from one or more INPUT after clicking on a SUBMIT button in ASP . NET C#
First make sure that Index.aspx starts with the following line, which will bind your Markup page with your code-Behind. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Index.aspx.cs"…
-
1
votes3
answers1328
viewsA: how to check the <input type=date> in js?
A simple solution, restricted to native features and only with javascript, is to add an event in the focus of the form controls, add the property required in its date of birth input and using the…
-
2
votes1
answer546
viewsA: Captions do not appear in HTML5 video tag
There are some points to be corrected in your subtitles file... The decimal separator for the milleseconds should be the . and not the ,. It is recommended that you start the first line of your .vtt…
-
0
votes1
answer96
viewsA: Implementation of a catalog with Turn js, using Ajax
See that in its static implementation the component expects a <div class="page"> for each image, already in its construction via ajax, you are placing all the images inside a úinca…
-
2
votes1
answer45
viewsA: Server.Mappath does not find the folder in my project
Bar missing... Server.MapPath("Arquivos\"+arquivo.FileName)
-
1
votes1
answer57
viewsA: Input text value does not come with outerHTML
To make explicit in the widget declaration, replace the $(this).prop('value',resposta_aluno[i+1]); for $(this).attr('value',resposta_aluno[i+1]); var $html = $('<div />',{html:'<input…
-
0
votes1
answer184
viewsA: Variavel is not defined (Javascript)
She really is not... See that valorForro, is restricted to the scope of the method RemoverForro(valor), as well as land max_fields7 at the $(add_button7).click(), although in that case they were not…
-
4
votes3
answers371
viewsA: Create widget with "onclick()"
You must use your own onclick. //método do evento let clickLixeira = function () { console.log('Clicou na lixeira'); } let inputExc = document.createElement('i') //cria inputExc.className = 'fas…
javascriptanswered Leandro Angelo 9,330 -
2
votes1
answer50
viewsA: Is it possible to take a data from a JSON using a predefined variable?
Just like any object in javascript, you can get the value of a property through its name, in your case it would be: success: function(result) { console.log(result[jsonCodeProduct]); } See the…
-
1
votes2
answers69
viewsA: Globalization does not work when deploying
You need to put that statement on web.config from the root of your application, within the <configuration> and <system.web>. <configuration> <system.web> <globalization…
-
0
votes3
answers352
viewsA: HTML5 validation before preventing form submission
If you are only using HTML5 validation, there is no need for any javascript including the preventDefault(), only one form, with an input required and a Ubmit button Example: <!DOCTYPE html>…
-
1
votes1
answer42
viewsA: Click on information, display a text field, change information and save automatically
Below is a basic example of how you can present this interaction. In the example below I am enabling editing for the elements <p> and <h2> and you can use the selectors you find suitable…
jqueryanswered Leandro Angelo 9,330 -
1
votes1
answer135
viewsA: How to delete a photo after preview?
Well, just take an initial image, and save that value to restore when you click the delete button... var profilePic = null; function previewImagem() { var imagem =…
javascriptanswered Leandro Angelo 9,330 -
1
votes2
answers263
viewsA: Form Validation - Step by Step (Javascript)
At the event onStepChanging validate and if you do not agree use a return false onStepChanging: function (event, currentIndex, newIndex) { var fullname = $('#first_name').val() + ' ' +…
-
0
votes1
answer506
viewsA: Overwrite table data with Datatables
You should not initialize the component more than once, just as it also makes no sense to perform two ajax requests to populate the table, see that you do one at the beginning of your Function and…
-
1
votes1
answer364
viewsA: Error in the shaman saying that the type was not found
You are reversing things, assembly is the name of the dll and usually has the same name as your project, if the one in question is called only Xamarin the Assembly is just Xamarin and not…
-
0
votes1
answer816
viewsA: Clear field with Jquery
To clean only the <input="file">, without having to reset all the forumlar, you can use the method wrap(), adding a new form to this element, resetting only it and then using the unwrap() to…
jqueryanswered Leandro Angelo 9,330 -
2
votes1
answer66
viewsA: Httpclient reuse and an Apicontroller lifecycle
I would create a BaseApiController abstract inheriting the ApiController and add the HttpClient as an audience there public abstract class BaseApiController : ApiController { public static…
-
0
votes1
answer89
viewsA: Script conflict in my html file
The reason for the behavior is because you make the Binding of EventListener only in page loading... so elements that were added later do not receive this assignment, you can highlight those new…
-
1
votes1
answer53
viewsA: Javascript functions
Instead of using the method getElementsByTagName() where you would search the elements by tag, in case <input>, use the getElementById(). Since this is the argument you are already using for…
javascriptanswered Leandro Angelo 9,330 -
4
votes1
answer106
viewsA: Foreach or for inside an Anynimous Type C#
Using the Linq you can write something like the example below, to simplify... ParcelasPgto = e.FormaPagamentoParcelas.Select(fp => new { Prazo = fp.Prazo}).ToList();…
-
0
votes1
answer117
viewsA: Use befereSend in ajax to make a loading screen in Modal
This behavior may be displayed, when you have a modal hidden at a time when it has not finished opening it may be in a state that will ignore the argument of hide. And in your case it’s related to…
-
1
votes1
answer60
viewsA: Sending form with Asp net mvc5
Just you fire the submit() form via javascript... let enviar = function(){ document.getElementById("formulario").submit(); }; <form id="formulario"> <input type="text" name="teste"…
-
1
votes1
answer34
viewsA: Serialize everything in a single line
One option is to use XDocument of System.Xml.Linq System.Xml.Linq.XDocument doc = System.Xml.Linq.XDocument.Load("E:\\nota.xml"); doc.Save("E:\\notasemesp.xml",…
c#answered Leandro Angelo 9,330 -
1
votes4
answers1217
viewsA: Multiple choice question
One more option let respostasCorretas = ["D", "A"]; $("#btnConfirmar").on("click", function() { let selecionadas = $("input[name='questao']:checked"); let corretas = 0…
-
2
votes1
answer126
viewsA: How to pass more than one url to ajax consume json?
You cannot, you will have to make the requests to the two different addresses. var url_aparecida = 'https://upvagasweb.000webhostapp.com/gerenciamento/php_access/access_json_aparecida.php'; var…
-
2
votes3
answers283
viewsA: No Fill new column as Null, yes with specified value in script
Add the column with a default value with the instruction WITH VALUES for existing lines to receive this value, it will also give you a breather to adjust the system that still needs to be changed to…
-
1
votes1
answer24
viewsA: Focus on a field with maskedinput
To clear the value of the field, you just need to undo its value before you focus. For the browser autocomplete you can try the autocomplete="off", but some ignore this instruction. let cont = 0;…
-
0
votes1
answer61
viewsA: Doubt with Asp.NET MVC Update
The problem here is not the first, second or third transfer... The issue is that in the operations you are assigning to your _context.Usuario the value of Currency of the object Usuario received as…
-
0
votes1
answer104
viewsA: How to go through Checkbox in automatically generated Webforms with Jquery
If they were generated in Jquery or simply added in html, they only exist on the client screen and not on your server. That is, they are not server side components that were rendered by Asp.net and…
-
2
votes1
answer267
viewsA: How to mix parameters within an HTML.Beginform ASP.NET
The <select> is not being sent by the form because it does not have the attribute name. While id is important for Javascript in the DOM, the controls of <form> shall be attached only to…
-
1
votes1
answer72
viewsA: Problem Initialize List for ASP.NET MVC validation
Yes it is possible, but if you want to change the model you are receiving in the action you need to clean the ModelState and then revalidate again. First it is important that your ViewModel…
-
3
votes3
answers166
viewsA: Disable tab showing all results
If you don’t want the tab todos, simply do not include it in the layout and when loading the page pass the filter you want, in the example below I put the class .teste1 And note that you had left in…
-
0
votes1
answer128
viewsA: range slider jquery
You can even achieve something similar to defining steps with nstSlider, through the attribute rounding in its builder. But it is not a very reliable medium. $('.nstSlider').nstSlider({ "rounding":…
jqueryanswered Leandro Angelo 9,330 -
2
votes1
answer117
viewsA: input password in css does not work
As long as the inputs are inside a container with id="contact"they will receive the style defined in CSS See the example below: #contact input[type="text"], #contact input[type="email"], #contact…
-
0
votes1
answer55
viewsA: Error while running js
This error happens because you are probably displaying the javascript block before you even present the element in html and expect it to be available on DOM, soon var x is not defined and does not…
-
2
votes1
answer159
viewsA: How to fix CSS problem with Letter-Spacing and right-aligned text?
If you declare the value as a variable and use the Calc function to invert it in the margin-right, you can get around the problem. p + p { --espaco : 15px; letter-spacing: var(--espaco);…
-
2
votes1
answer130
viewsA: The page was loaded through the HTTPS, but requested an unsafe Xmlhttprequest endpoint
This happens because you are making your page available via HTTPS, on a secure connection, but in your javascript you are making requests to an address without this protection, which in case is the…
html5answered Leandro Angelo 9,330 -
1
votes3
answers272
viewsA: Deserialization of JSON
The example you showed does not represent an object Cidade who owns a property CidadeItem of the kind List<string>. It is actually an object that owns a property Cidade which can be a…
-
2
votes1
answer49
viewsA: Load script every X seconds
If you expect recursive behavior, you should use the setInterval() function carregar() { ///$("odometer").load("counter.txt"); console.log('olar'); } setInterval(carregar,5000); <script…
javascriptanswered Leandro Angelo 9,330 -
3
votes1
answer31
viewsA: Put a value in front of another HTML tag using span
It seems to me that you are abusing <span>, which would only make sense if you wanted to change something in the presentation of your content, but which could also be represented with a…
html5answered Leandro Angelo 9,330 -
0
votes1
answer111
viewsA: API qrcode Google does not recognize the signal +
In URL Decode signal + is representing a space, as well as the %20, if you want to explicitly guarantee its value as +, replace with %2B…
-
0
votes1
answer76
viewsA: Integrating API in c#
You need to make your public method within the class Program... but if it will not be accessed at all Forms, I see no reason why it should be available here and not within the partial form. static…
c#answered Leandro Angelo 9,330 -
0
votes1
answer268
viewsA: Setting cursor at string position within textbox
To keep the cursor at the end of the content you must use the properties SelectionStart and SelectionLength of TextBox. See the example below: private void txtPreco_KeyUp(object sender, KeyEventArgs…
-
0
votes1
answer145
viewsA: Error in accent words using Httpcookie
One solution is to store this information in a Unicode format that can be reversed again, preserving the special characters I suggest URL Encode, through the methods UrlEncode() and UrlDecode() of…
c#answered Leandro Angelo 9,330 -
3
votes3
answers198
viewsA: Change link text without id or class
If you want to change text via Javascript, follow an example in Jquery $(document).on('ready', function(){ let novoTexto = "MEU NOVO TEXTO"; $("td[class='corpo-nome'] a:first") .text(novoTexto)…
-
3
votes1
answer2168
viewsA: How to open page in google Chrome ultilizando C#
You can use the Process.Start(). using System; namespace ConsoleApp { public class Program { public static void Main() { System.Diagnostics.Process.Start("chrome.exe", "https://answall.com"); } } }…
c#answered Leandro Angelo 9,330