Posts by Leandro Angelo • 9,330 points
440 posts
-
1
votes3
answers847
viewsA: How to prevent background scrolling when opening a modal window with javascript?
If you are using bootstrap, as it seems, add to this class body.modal-open { overflow: hidden; }
-
2
votes1
answer44
viewsA: How to return a message warning that there is already a record?
You should add the error state before checking if the model is valid. And the error should be pointed to some attribute of your model, after seeing your view, it seems to me that CepCodigo would be…
-
1
votes1
answer2256
viewsA: How to link a computer file in my html?
In your case, the most appropriate would be to use virtual paths as in the example below. So even if you are accessing your projects via file system or if you create a local hosting for the site…
-
1
votes2
answers46
viewsA: I’m having trouble getting this div centralized and Responsive
In class .ml a add the following attributes: display:inline-block; float:none; .ml{ text-align: center; color:#3A89AF; min-width:100%; margin:auto; } .ml p{ text-align: center; color:#000; } .ml a{…
-
2
votes2
answers1354
viewsA: Change div size by hovering the mouse
You can achieve this result with CSS through attributes transition and transform, remember to add the redundancies with the prefaces -webkit-,-ms- and -moz- in order to find compatibility with other…
-
3
votes1
answer41
viewsA: What is the difference between Settings and Resource?
The big difference is that when using Resource after changing some value, add or remove a key, you need to recompile the application. Then Resources should be used for more "static" content such as…
c#answered Leandro Angelo 9,330 -
0
votes1
answer104
viewsA: Problem with radiobutton Asp mvc
Basically your view is waiting for a Viewmodel GuialetoLMS.Models.GuialetoModel and you’re passing one on to her a different kind,GuialetoLMS.Models.Vestibular. If you wanted to pass only the…
-
2
votes2
answers1396
viewsA: Specify Modal Size
You must not change bootstrap.min.css, what should be done is to define the style in your own css that should be declared after bootstrap; Add the class: .modal { width: 700px; }…
-
1
votes1
answer53
viewsA: Maintain a C# - Rest request
Not in a Rest api, what you can do is schedule this task on the application server or develop is a windows service that will run there. You can also add this job to the database (if your application…
-
0
votes1
answer2819
viewsA: How to get values from the selected line in gridview by clicking the button
It’s been a long time since I’ve handled this, but the way is this way: <asp:GridView ID="GridView1" runat="server" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" ... And in the Behind:…
-
1
votes1
answer37
viewsA: Problem with dropdownlist auto-refilling
It turns out that on the return of your Get, you simply add the result of the Query and the <option>Selecionar Matéria</option> is already there. $(document).ready(function () { $.ajax({…
-
1
votes3
answers95
viewsA: how could I use instead of passing an id, passing a Class in JQUERY?
If I understand correctly the question you seek something like this. $('.btnSubmit').click(function () { var button = $(this); //console.log("Você clicou em: " + $(this).attr('id'));…
-
1
votes1
answer60
viewsA: Drag & drop: Detect when element is not released in marked place
More or less what you’re looking for? var noAlvo = false; function allowDrop(ev){ ev.preventDefault(); noAlvo = true; } function drag(ev){ ev.dataTransfer.setData("text", ev.target.id); } function…
-
0
votes1
answer218
viewsA: Two Foreign key in the same EF column
So you are confusing some things. EF with Entity, Table with Class and Attribute with Column. First: public virtual UsuarioSistema CadastradoPor { get; set; } public virtual UsuarioVisitante…
-
0
votes2
answers329
viewsA: Working with Filestream and BLOB
Follow an example approach to your problem, if sql has access to the repository where the files are, you can do it yourself. static void FileStreamMethod() { /*Conecta ao SQL*/ SqlConnection cnnSQL…
c#answered Leandro Angelo 9,330 -
1
votes1
answer74
viewsA: I can’t open my grid view link
You cannot open a local file on the user’s machine through a link, for security reasons this is blocked in most browsers If you open the console, you will surely see an error similar to "Not allowed…
-
1
votes2
answers88
viewsA: How to use Jquery functions in array?
You can use the .get() $(document).ready(function(){ var size = $("#size"); var index = 1 //seu 1; $(size.find('option').get(index)).attr('selected', 'selected'); }); <script…
jqueryanswered Leandro Angelo 9,330 -
0
votes2
answers743
viewsA: Microsoft Visual Studio 2013 - There were compilation errors. Do you want to continue and run the last successful compilation?
For various actions Visual Studio needs privileges of an administration account on the machine. To run it as Administrator it is necessary that the logged-in user has such privileges (it is included…
-
0
votes4
answers974
viewsA: Add Select Multiple values
Follow an example: $(document).ready(function () { $('#idservico').change(function() { var total = 0; $(this).find(':selected').each(function(i){ total += parseFloat($(this).data('valor')); });…
-
1
votes2
answers92
viewsA: CSS with Font Awesome
I think this is the way to what you’re looking for. @import 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'; blockquote { font: 14px/20px italic Times, serif;…
-
0
votes1
answer59
viewsA: Problems Inserting Image on a Button
Add the reference xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" Source…
-
0
votes1
answer812
viewsA: Error Trying To Access Webservice
By default IIS does not have the extension. asmx in the list of standard documents of the website, in your case, because there is no default as the last alternative it will try to display the list…
-
1
votes1
answer74
viewsA: How to change the color of the icon inside a Rectangle - WPF
According to the library’s reference, this would be the solution: <Rectangle Width="20" Height="20" Margin="0 0 7 0" Fill="White"> <Rectangle.OpacityMask> <VisualBrush…
-
1
votes2
answers2588
viewsA: C# Call Controller method Asp.Net MVC5 with Ajax
In his GetData(), if using the Aspnetcore or later, change the return to the specialized type JsonResult() [HttpPost] public JsonResult GetData() { List<Dados> qry = new List<Dados>();…
-
1
votes1
answer56
viewsA: I can’t save my record
Henry, this is not a mistake. The exception is purposeful precisely to indicate that your program is not complete. internal void Insert(int p, string p_2, string p_3, int p_4, string p_5,…
-
1
votes2
answers1217
viewsA: Overlay two images with :
It turns out that the way you’re doing it, at Hover, you replace the image instead of displaying the other one overlaid. You’ll need to change the structure of your html a little and add a treatment…
-
1
votes3
answers100
viewsA: Generate number count by clicking
If your goal is to mark only in the browser, follow an example. But as you indicated the PHP tag in the question... if you want to persist this count on the server, you will need to prepare a…
javascriptanswered Leandro Angelo 9,330 -
2
votes3
answers760
viewsA: Hide part of string
Follow a simple example using Jquery. function Show(e){ var span = $(e).closest('span'); span.html(span.attr('data-full')); } <script…
-
0
votes1
answer517
viewsA: Pass data to viewbag from controller to view using Chart.JS
You are forgetting to format the result as expected and are printing only the object. Note that for the List<double> I added a treatment to preserve separation by "." otherwise it would be…
-
2
votes2
answers62
viewsA: I’m trying to move my text to the bottom right corner but I can’t
In his <div> add stributo style and the property text-align: right; I left the bottom of the <div> as gray only to allow visualization in response. <div style="background-color:#ccc;…
htmlanswered Leandro Angelo 9,330 -
0
votes1
answer70
viewsA: UWP application run sequence of videos in Mediaelement coming from a List<string>
You must use the object MediaPlaybackList();, add your videos to this playlist and then assign it as your player’s source. Reference…
-
2
votes1
answer1186
viewsA: Multiple select list with items already selected using Razor
You are using the wrong helper, if you want multiple values to be selected, you need to use the MultiSelectList() @Html.DropDownList("StatusImovel", new MultiSelectList(ViewBag.ListaStatus,…
-
1
votes2
answers88
viewsA: How to make radio effect in div
Here’s a simple example using Jquery $("div").on('click', function(){ $('div').removeClass('selecionado'); $(this).toggleClass('selecionado'); }); div{ height:20px; width:20px; display:block;…
-
2
votes3
answers836
viewsA: Show button according to php parameter condition
Just break your php block or else write html from the snippet as a string. $parametro = $_GET['Parametro']; if ($parametro == 1){ ?> <button type="submit" class="btn btn-info btn-rounded">…
-
0
votes1
answer372
viewsA: How do you make the menu 100% when zooming in?
Add the following code to your css. Probably what’s happening is that when zooming in the margins and paddings of html and body increase as well. html,body{ width:100%; height:100%; margin:0;…
-
1
votes1
answer51
viewsA: Problem with slide show img’s
Maybe you’re forgetting to add references to the flexslider library and its css. I added both in the example below and the behavior is as expected. // Can also be used with $(document).ready()…
-
1
votes2
answers137
viewsA: fade toggle jquery
A playful example using Jquery $(document).ready(function(){ var contador = 0; $("#botao").on('click', function(){ contador++; $(this).val("Yay!"); $("#texto").fadeOut(function(){…
-
0
votes1
answer27
viewsA: Message duplication in Chat at the time of the Webinar (client side)
Although not presented in the question asked by the author, the behavior occurs on account of the execution at various times of the function carregaChat(). Deducing that it would be a boot-only…
-
0
votes1
answer437
viewsA: Return two models in a view (foreach)
You can solve several ways, but I recommend you change your view models a little. I will leave an example and edit the answer after you post your Masterlayoutmodel, with the ideal solution. Edit…
-
0
votes2
answers63
viewsA: Difficulty in putting the right images but they are diagonal
I didn’t see your javascript, but the visual solution I thought I was looking for I solved it with CSS, including removing all redundant attributes from its elements. Make sure that’s what you’re…
-
0
votes1
answer52
viewsA: receiving option selected option option option button
Follow an example using Jquery to add the filter to your select. var options = { valueNames: [ 'name', 'born','city' ] }; var userList = new List('users', options);…
-
1
votes1
answer279
viewsA: Webclient C# finishing download before starting to download
Probably because the Downloadfileasync method is suppressing some error, its split is not properly breaking the string return and the download url is in the third position of the array, I made some…
-
1
votes2
answers546
viewsA: Publish my system to IIS and it is not loading multiple files
The first step you can try is to simply convert your directory to an application. Open the IIS manager (type inetmgr in windows "run") But it may still require some adjustments to your application…
-
0
votes3
answers876
viewsA: How to remove a <TR> element from a list created with append?
First, you are using th instead of td, I changed your code a little and added the feature to remove the added tr. var precoFinal = 0; $('#botao').on('click', function(event){ event.preventDefault();…
-
3
votes2
answers489
viewsA: ASP.NET Core Isdevelopment
You need to assign the value of "Development" to the ASPNETCORE_ENVIROMENT environment variable. Before running "dotnet run" run the command below: Console of the CMD setx ASPNETCORE_ENVIRONMENT…
-
0
votes1
answer1462
viewsA: Automatic line breaking textbox multiline email form C#
Follow a treatment I’ve used a few times. string conteudoTexto = text_mensagem.Text.Replace(System.Environment.NewLine, "<br />"); // Conteudo do corpo do e-mail mailMessage.Body =…
-
0
votes3
answers436
viewsA: error saving or updating with Entityframework
It seems to me that you are facing a scope problem and I wouldn’t recommend you using the Try/catch structure for that either... but this will solve your problem using (var context = new…
-
3
votes2
answers351
viewsA: Apply between in an hql in c#
Follow an example public IList<Abastecimento> ConsultaPeriodo(DateTime dataInicio, DateTime dataFim) { string hql = "SELECT a FROM Abastecimento a WHERE a.DtAbastecimento BETWEEN :dataInicial…
-
1
votes1
answer35
viewsA: Appear table after filling fields and press button
You can simply check if the page is the result of a post. <? if ($_SERVER['REQUEST_METHOD'] === 'POST') { ?> <table width="100%" class="table table-bordered table-hover table-responsive…
-
4
votes1
answer561
viewsA: how to insert 2 different recipients for sending form
Add the second recipient by "," if(mail("[email protected], [email protected]",... To make it a little more elegant and facilitate later maintenance, use variables for your…