Posts by Matheus Miranda • 5,375 points
290 posts
-
2
votes1
answer149
viewsQ: How to customize "Confirmation window"?
Follows the code: @using (Ajax.BeginForm("Action", "Controller", new AjaxOptions { HttpMethod = "POST", OnSuccess = "OnSuccess", Confirm= "Tem certeza ?" }, new { @class = "form-horizontal", role =…
-
4
votes1
answer29
viewsQ: How to use scrollbar bottom when opening modal?
In the code: .modal-body { max-height: calc(100vh - 210px); overflow-y: auto; } <link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet"/> <link…
-
1
votes1
answer231
viewsQ: How can I convert datetime to data string?
Follows the code: var fullEntries = dbContext.tbl_EntryPoint .Join( dbContext.tbl_Title, combinedEntry => combinedEntry.entry.TID, title => title.TID, (combinedEntry, title) => new { UID =…
-
1
votes1
answer283
viewsA: Changing the width of the screen makes disappear horizontal scroll bar
I discovered the problem, it was the class table-responsive that surrounds in a scrolling element that conflicts very badly with the Datatable resizing. So just remove line: <div…
-
0
votes1
answer283
viewsQ: Changing the width of the screen makes disappear horizontal scroll bar
Follow the example in jsfiddle: https://jsfiddle.net/DTcHh/31217/ Follow the image of the problem: Follow the image as it should: Browsers tested: Google Chrome Version 57.0.2987.110 (64-bit): Does…
-
1
votes1
answer1325
viewsQ: How to fix the last column with horizontal scroolbar?
I’m using a simple plugin: http://www.jquery-bootgrid.com/ How can I leave last column fixed ? Here is an example of a fixed column:…
-
1
votes1
answer57
viewsQ: How to foreach in each select using EF6?
Follows the code: var list = new List<String>(); list.Add("Casa"); list.Add("Apartamento"); var connection = ctx.Table.Where(x => x.Tipo== list).ToList(); My database:…
-
0
votes1
answer46
viewsQ: How to maintain value in Html5 even when changing in F12 mode?
Follows the code: Html5: <button id="btnSave" data-id="1">Save Click</button> JS: $(document).ready(function() { $("#btnSave").click(function(e) { AlertSave($(this).data("id")); }); });…
-
3
votes2
answers70
viewsQ: How to use Contains without capitalization and minuscule
Follows the code: var result= db.Table.Where(l => l.Field== value).ToList(); var search = "jOãO pAuLo"; result = result.Where(l => l.Example.Contains(search)).ToList(); Only works that way:…
-
3
votes1
answer828
viewsQ: A specified Include path is not Valid. The Entitytype 'Model.User' does not declare a navigation Property with the name 'Connections'
I’m following this example to maintain connection and user information in a database. So I created 2 tables: dbo. User: dbo. Connection: These 2 tables above are very simple. I only created as a…
-
1
votes1
answer1643
viewsQ: How to call a function within an anonymous function?
Follows the code: minhaFuncao(); Here is the code: $(function () { $.connection.hub.start().done(function () { function minhaFuncao() { alert("ok"); } }); }); I get error: myFuncao is not defined at…
javascriptasked Matheus Miranda 5,375 -
1
votes3
answers1531
viewsA: Validate field after typing in ASP.NET MVC
From what I understand you want to check if the value exists in the database. If there is no such value, show a warning. I prefer to use Ajax.beginForm, easier and cleaner. But you need one more…
-
1
votes2
answers101
viewsA: Regularexpression allow greater than 0.00
Just change your code: Barter: ^(?!0,00)\d+\,\d{0,2}$ For: ^(?!0,00)\s*(?:[1-9]\d{0,2}(?:\.\d{3})*|0)(?:,\d{1,2})?$ Segue regex online: https://regex101.com/r/ALgFkf/1…
-
0
votes2
answers101
viewsQ: Regularexpression allow greater than 0.00
False value: 0,00 -- false True value: 0,01 -- true 0,10 -- true 1,00 -- true 10,00 -- true 100,00 - true 1.000,00 -- true 10.000,00 -- true 100.000,00 --true 1.000.000,00 -- true 10.000.000,00 --…
-
1
votes1
answer87
viewsQ: How to pass "Isauthenticated" parameter to actionfilter?
I’m trying somehow to pass parameter to actionfilter. Please follow the code: Controller: [LogActionFilter(IsAuthenticated = Request.IsAuthenticated)] //Tentativa 1…
asp.net-mvc-5asked Matheus Miranda 5,375 -
0
votes0
answers136
viewsQ: Modal bearing (scroll) does not work when dropdown is open
Please see in jsfiddle: https://jsfiddle.net/znrktLej/11/ With dropdown menu open, modal scroll does not work, gets frozen. What am I doing wrong ? Follows code: .modal-body { max-height: calc(110vh…
-
0
votes1
answer1205
viewsQ: How to show an image using javascript?
The following code is in javascript: <img class=\"modal-loading\" src=\"~/Content/img/loading.gif\" /> The final result:…
javascriptasked Matheus Miranda 5,375 -
1
votes3
answers93
viewsA: Q: Choose two select and display result
First of all, I recommend you read this article here. For lack of javascript knowledge. Your JS code has syntax errors: function passagem(){ var sel_origem = document.getElementById("item1"); var…
-
0
votes1
answer30
viewsA: Auto List Member does not work with javascript
I solved the problem. The problem was related to Nuget. Goes on the menu PROJECT > Manage Nuget Packages, Go uninstall each one to see if it really solves the problem. Then I discovered the…
-
2
votes1
answer318
viewsQ: How to clean/reset bootstrap fileinput after selecting new image?
I am trying to clean/reset after selecting new image. After selecting image, clean Initial Preview Follows the code: HTML: <input id="input-pd" name="input-pd[]" type="file" multiple…
-
4
votes1
answer962
viewsQ: Magnific-Popup with Bootstrap Modal Image Display Problem
I am facing the problem of displaying image inside the modal bootstrap. Use this plugin : Magnific-Popup Follows the code: HTML: <!-- Button trigger modal --> <button type="button"…
-
0
votes1
answer313
viewsQ: The getPreventDefault() method should no longer be used. Instead, use defaultPrevented - Browserlink
I get this error on all pages when browserlink is enabled: The getPreventDefault() method should no longer be used. Instead, use defaultPrevented. browserLink:37:40278 Follow the image: Unchecking…
-
1
votes1
answer841
viewsQ: How to load image from javascript using Base64?
Good evening, I’m using this plugin: http://ashleydw.github.io/lightbox/#single-image Here is JSFIDDLE: https://jsfiddle.net/DTcHh/30015/ Follows the code: HTML: <button type="button" class="btn…
-
1
votes1
answer30
viewsQ: Auto List Member does not work with javascript
I use Visual Studio 2015, I’m having trouble not displaying auto list Member in javascript. *I’ve been in the configuration > Text editor > Javascript > General. *I’ve noticed Visual Studio…
-
1
votes1
answer33
viewsQ: Jquery Event Click does not work in image preview
Clicking the img element does not work to call a JS function, which I am doing wrong ? Follow the code below: HTML: <label class="control-label">Select File</label> <input…
-
3
votes3
answers111
viewsQ: How to disable the "See Details" button in the image preview?
I’m using: http://plugins.krajee.com/file-input Here is an example in jsfidde : https://jsfiddle.net/DTcHh/30000/ How to disable this button: Here is the code: HTML: <input id="input-id"…
-
-1
votes1
answer181
viewsQ: How to make a filter before performing action?
Before executing action, I want to make a filter to check if the value exists. If value does not exist, return to specific page(Index, Home). Some solution ?
asp.net-mvc-5asked Matheus Miranda 5,375 -
2
votes0
answers483
viewsQ: Twitter Bootstrap vs. Semantic UI
Can anyone tell the difference between these libraries? I saw that Semantic has more advantages than Bootstrap but it would be good to know if someone knows both and can compare features, solutions…
-
0
votes1
answer218
viewsQ: How to customize error 404 using Httpnotfound?
Follow the code below: Controller: if (id == null) { //Response.StatusCode = 404; return HttpNotFound(); } View: @{ Layout = null; } <h2>Página não encontrada</h2> I added new code web…
asp.net-mvc-5asked Matheus Miranda 5,375 -
2
votes1
answer378
viewsA: How to apply Dropdownlistfor with bootstrap?
I managed to solve it that way: Use : https://silviomoreto.github.io/bootstrap-select/examples/#customize-menu Then change the code: That: @Html.DropDownListFor(model => model.CountryId,…
asp.net-mvc-5answered Matheus Miranda 5,375 -
6
votes2
answers1041
viewsQ: What is the difference between "step over" and "step into" in Debugger mode?
I wonder what the difference is between F10 (step over) and F11 (step into). When should I wear F10 and when to use F11?
-
0
votes2
answers349
viewsQ: Checkbox Switch - One of them must be marked as true or 1
Example: I have 6 different checkboxes. All of them have name="checkbox[]", one of them must be marked with 1 or true. Here’s an example in jsfiddle: https://jsfiddle.net/vh8d9un8/14/ The "SUBMIT"…
-
1
votes1
answer2461
viewsQ: Bootstrap - How to increase the size of the input column?
Follows the code: On the index page: <!-- Modal --> <div class="modal" id="minhaModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div…
-
6
votes1
answer1657
viewsQ: Entity Framework - What is the difference between With Entitystate.Modified and Without Entitystate.Modified?
What’s the difference between the two ? With Entitystate: var registro = db.MinhaTabela.Where(a => a.MeuCampo == "Valor_Antigo").FirstOrDefault(); registro.MeuCampo = "Valor_Novo";…
-
2
votes2
answers1054
viewsQ: Jquery Validate with Jquery-Price-Format
How to make the field mandatory when the value is 0.00 using jquery validate ? Following example in image: As you can see in the image above, the person did not enter the value, when clicking the…
-
1
votes1
answer134
viewsQ: Google Maps - After doing new search, remove old Marker
Follows the code: function initAutocomplete() { debugger var markers = []; var latitude = parseFloat('@Model.Latitude'); // -23.4811396 var longitude = parseFloat('@Model.Longitude'); // -46.3676736…
-
0
votes2
answers446
viewsA: Regain marker latitude and longitude (Marker)
I found another way easier and more practical. Follows the code: After that line var places = searchBox.getPlaces(); add this to your code: var lat = places[0].geometry.location.lat(); var long =…
-
0
votes1
answer528
viewsQ: How to search address only through google maps?
Here is an example in javascript: function initAutocomplete() { var map = new google.maps.Map(document.getElementById('map'), { center: {lat: -33.8688, lng: 151.2195}, zoom: 13, mapTypeId:…
-
2
votes1
answer642
viewsQ: Jquery Validate does not work with extension type - File Input
Follows the code: $(document).ready(function () { $("#myform").validate({ ignore: ":hidden", rules: { images: { required: true, extension: "jpg"}, messages: { images: Arquivo inválido} },…
-
1
votes2
answers818
viewsQ: How to disable old dates in Bootstrap Datepiker version?
Can not choose the old date. For example: Today is day 18/01/2017, You have to disable 17/01/2017, 16/01/2017 e assim vai ... Can not disable date today and future. Here is the full code in jquery…
-
1
votes1
answer1112
viewsQ: How to get date without Datetime time?
Within the date variable I have this: Here is the html code: <input type="text" class="form-control" readonly disabled value="@Model.Data"> Final result: What is the simplest way to get date ?…
-
2
votes2
answers181
viewsQ: Modal Bootstrap - Navigate element within modal
It is a simple modal with large text. Follows the code: <div class="modal fade"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div…
-
0
votes1
answer1542
viewsQ: Jquery Validate - Mark at least 1 checkbox true
I use toogle bootstrap from this example: http://www.bootstraptoggle.com/ I have 4 checkbox, one of them must have true. How to do this with jquery validate ? Follows code: <label…
-
2
votes1
answer63
viewsQ: state' cannot be Assigned to -- it is read only - Entity Framework
Follows the code: var resultado = db.Tabela .Where(l => l.Nome == "João") .Select(l => new { l.numero, l.cidade, l.estado, l.pais }); I know that in the database has "SP" value of the state…
-
2
votes1
answer1460
viewsQ: How to use Ajax with Antiforgerytoken?
Follows the code: //AntiForgeryToken function gettoken() { var token = '@Html.AntiForgeryToken()'; token = $(token).val(); return token; } Ajax and formData: var formData = new FormData(); var file…
-
3
votes1
answer487
viewsQ: Validate Jquery does not work with Toggle Bootstrap
I’m using http://www.bootstraptoggle.com/, a simple toggle of true or false. Here is the code: View: <form id="myform"> @Html.CheckBoxFor(model => model.Permitir, new { id = "toggle1",…
-
0
votes0
answers108
viewsQ: Autoreplace does not work using fileinput bootstrap
The idea is this: When selecting image, it will directly save in the database without using save button. Here is an example: http://plugins.krajee.com/file-input-ajax-demo/6 Follows the code: Html:…
-
0
votes1
answer572
viewsA: Synchronous Xmlhttprequest on the main thread is deprecated because of its detrimental effects to the end user’s Experience
I solved the problem differently. Removing the line :@Scripts.Render("~/bundles/jqueryval"). And add this code in javascript: <script type="text/javascript"> $("form").removeData("validator");…
-
1
votes1
answer572
viewsQ: Synchronous Xmlhttprequest on the main thread is deprecated because of its detrimental effects to the end user’s Experience
When I include @Scripts.Render("~/bundles/jqueryval") at the bottom in partialview I get warning on log: Synchronous Xmlhttprequest on the main thread is deprecated because of its detrimental…
-
4
votes1
answer78
viewsQ: How to make Selectlistitem substring?
Follows the code: View: @model IEnumerable<Projeto.Models.Model> <table class="table table-striped"> <thead> <tr> <th> @Html.DisplayNameFor(model => model.Id)…