Posts by Netinho Santos • 2,366 points
126 posts
-
2
votes1
answer50
viewsA: Sync and corrections by n17t01
You can call the second Ajax in the Success of the first Ajax Example $.ajax({ type: "post", url: "add.php", data: formDetails.serialize(), success: function (data) { $.ajax({ type: "POST", url:…
jqueryanswered Netinho Santos 2,366 -
5
votes4
answers9972
viewsA: How to get the month and current year in SQL?
Use the DATENAME. See a example SELECT DATENAME(month, GetDate()) + ' de ' + DATENAME(year, GetDate()) Note: DATENAME applies to: SQL Server (SQL Server 2008 up to current version), Database Windows…
-
0
votes1
answer231
viewsA: How to display Modelstate errors when POST is done by AJAX?
You can return one Json containing the errors of ModelState Action if (!ModelState.IsValid) { return Json(new { success = false, errors = ModelState.Values.Where(i => i.Errors.Count > 0) }); }…
-
0
votes1
answer487
viewsA: Make the Bootstrap modal Footer display the vertically aligned buttons at the bottom - Asp.net MVC
For Bootstrap 4 use class mr-auto. Example <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script…
-
2
votes1
answer94
viewsA: Copy text file to textarea
var input = document.getElementById("arquivo"); var output = document.getElementById("saidaTextArea"); input.addEventListener("change", function() { if (this.files && this.files[0]) { var…
-
0
votes4
answers360
viewsA: How do I remove characters from a string to a certain extent? in PHP
You can use replace() (PHP 4, PHP 5, PHP 7) substr - Returns a part of a string Source: here $string = "142-22"; echo substr($string, 0, 3); See an example working on PHP Sandbox…
-
1
votes3
answers818
viewsA: Validate Select jqueryValidate with Materializecss
The material_select makes your select a display: none and the jQuery Validation ignore hidden fields. To enable validation of hidden fields use: $.validator.setDefaults({ ignore: [] }); Ps.: Use the…
-
1
votes3
answers277
viewsA: Using regular expressions with square brackets
Follow the regular expression to solve your problem and use Trim() to remove spaces. See an example working here. $string = "[Texto entre colchetes] Texto fora do colchetes"; echo…
-
0
votes1
answer80
viewsA: Why is the Codeview plugin not highlighting colors?
Missed you enter the references of Code Mirror <link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/codemirror.min.css" rel="stylesheet" type="text/css"> <script…
-
1
votes1
answer63
viewsA: Questions to resize with ASP.Net application
Use table-responsive Responsive tables allow tables to be rolled horizontally with ease. Make any table responsive in all viewports involving a .table .table-responsive. Or, choose a maximum…
-
1
votes1
answer1594
viewsA: Put mask to @Html.Editorfor
You need to include the reference of the Jquery.inputmask in his View. $("#cpf").inputmask("mask", { "mask": "999.999.999-99" }, { reverse: true }); $("#nascimento").inputmask("mask", { "mask":…
-
1
votes2
answers615
viewsA: How to put a dropdownlist in a cshtml
You need to specify that your ViewCidade is a SelectList in the DropDownList. @Html.DropDownList("Id", (SelectList)ViewBag.ViewCidade, "- Selecione -", new { @class = "form-control" }) See an…
-
2
votes1
answer106
viewsA: 3D Highcharts column chart with Amcharts appearance
Follow the angle rotation settings. alpha: 0, beta: 0, depth: 20, For more angle settings here in the section chart.options3d $('#grafico').highcharts({ chart: { type: 'column', options3d: {…
-
8
votes2
answers1324
viewsA: Return 0 when SUM is NULL
Use IFNULL(). Definition and use: The IFNULL() function allows returning an alternative value if an expression is NULL. If the expression is NOT NULL, the IFNULL() function will return the…
-
0
votes2
answers202
viewsA: Model error on Razor page
That is, my model needs to be instantiated. How do I work the page? You can do a check on Action if the model is null, if yes, instance it otherwise returns its model. public class CidadeController…
-
1
votes2
answers1101
viewsA: Display modal after form validation (fields filled)
You can manipulate your form by checking if it is valid through the method Valid and then with the modal open, if the user click the button accepted you can send your form through the method Submit.…
-
1
votes1
answer144
viewsA: Export a Jquery bootgrid to Excel
It is not included in the documentation of jquery-bootgrid the possibility to export, however you can use the Tableexport.js. You said in the question that you could not use it. Here is a note from…
-
1
votes1
answer207
viewsA: How to add redirect links to elements of the Jwplayer playlist
You can use the events to get the attributes in your json playlist. jwplayer("player").setup({ playlist: [{ "file": "//content.jwplatform.com/videos/RDn7eg0o-cIp6U8lV.mp4", "image":…
-
2
votes3
answers1061
viewsA: Knowing when your computer was Turned On / Off / Stopped
Using a different approach to get the Timegenerated. Note: There is usually a delay between the time an event is generated and the time it is recorded. It is more important to know when the event…
-
0
votes3
answers16511
viewsA: Validate only number in input
There are two ways to get the result with HTML only. The first one using regular expression in the Pattern attribute and the second using the type number. <form> <input…
-
3
votes2
answers797
viewsA: Aid balloon/information
Utilize tooltip already included in Bootstrap, see documentation. Use the attribute data-placement to set the tip position on the top, bottom, left or right side of the element: Tip: You can also…
-
0
votes1
answer934
viewsA: how can I put PDF documents on my website using the google drive api
Use the view option in the document instead of sharing. <iframe src="https://drive.google.com/file/d/1bMIyRuEDg_nsg8uSBu5GBF7CP7sj6wIs/preview" width="600" height="780" style="border: none;">…
-
1
votes1
answer248
viewsA: Block download in an audio streaming
To remove the audio tag download option you can use controlsList="nodownload" see documentation. However, this does not guarantee that the download will be done. <div id="player"> <audio…
-
5
votes1
answer5032
viewsA: JS or Jquery Decrease image size and not just resize
You can use the library compress.js. It uses the canvas API for client-side image compression. const compress = new Compress() const preview = document.getElementById('preview') const output =…
-
0
votes2
answers89
viewsA: Transforming bank information into Link
The simplest way to do it is to use tag <a> passing your url coming in the model to the attribute href. You can also use Bootstrap to style your button. <a href="http://@modelItem.Link"…
-
1
votes4
answers3163
viewsA: How to get the computer name?
To get the name of the computer only use the class Environment static void Main(string[] args) { var name = Environment.MachineName; Console.WriteLine("Nome do computador: {0}", name);…
c#answered Netinho Santos 2,366 -
4
votes1
answer68
viewsA: How do I get information from the drives by c#?
You can use the class Driveinfo to get information from drives. static void Main(string[] args) { var drives = DriveInfo.GetDrives(); foreach (DriveInfo info in drives) { Console.WriteLine("Nome:…
-
0
votes1
answer96
viewsA: Drag'n'drop items inside table
For drag and drop you can use the jQuery UI Sortable vê a documentação $("table tbody").sortable({ update: function(event, ui) { $(this).children().each(function(index) {…
-
0
votes1
answer343
viewsA: How to color Events in Fullcalendar?
I’m not sure I understand what you want, but follow an example. $('#calendar').fullCalendar({ events: [{ id: '01', title: 'event1', start: '2018-06-25' }, { id: '02', title: 'event2', start:…
fullcalendaranswered Netinho Santos 2,366 -
1
votes3
answers81
viewsA: Hide text between javascript keys
Using Regular Expression var text = $("div").text(); $("div").html('').append(text.replace(/(\s\{.*?\})/, '')) <script…
-
1
votes4
answers1275
viewsA: Check file size (all) with Jquey
For validations on the front with Jquery I came up using lib Jqueyr Validate. A fairly easy-to-use lib. Here’s an example of how to validate up to 200 kb $(document).ready(function() {…
-
1
votes1
answer1776
viewsA: C# - Remove QUOTES - Replace - Remove ASP Doubles
Using String.Replace. follows an example: http://rextester.com/ZPYKJ63622 public static void Main(string[] args) { var x = @"""22/06/2018 00:00:00"""; var y = x.Replace("\"", " ");…
-
0
votes2
answers1870
viewsA: How to pass input value via post on Asp.net core Razor
In your input put the property (name) with the same name as the parameter received in your action. Here is an example in dotnetfiddle <input asp-for="Tickets.Identificador" class="form-control"…
-
2
votes1
answer277
viewsA: How to handle the JSON response with Javascript
You can access the object values Json just use (.) for more examples: https://www.w3schools.com/js/js_json_objects.asp var resposta =…
-
2
votes2
answers3029
viewsA: Modal Bootstrap 4: How to call another within a modal
Follows a solution. $("#modal").click(function() { $('#myModal').modal('show'); }); $("#modal2").click(function() { $('#myModal2').modal('show'); }); <script…
-
0
votes1
answer70
viewsA: Logoff after editing a User Role
Try the following section. var autheticationUser = HttpContext.Current.GetOwinContext().Authentication; autheticationUser.SignOut();
-
2
votes1
answer249
viewsA: Error while trying to create a Controller or Apicontroller
Change the folder name to Controllers and namespace to Controllers. namespace MeuApp.Controllers { public class MessageController : Controller { // Seu código... } }…
-
0
votes5
answers1890
viewsA: Receive and read array coming by Ajax
I don’t know exactly how your array is coming, but for you to scan an array you can use the jQuery.each() var array = [3, 2, 3, 4]; $.each(array, function(index, val) { console.log("Indice: " +…
-
0
votes1
answer904
viewsA: Change Y-axis values in Chart js
In Chart.js the Y axis is determined by the property datasets see the documentation which can come from the bank or inserted in hard code as is done in the example below. var barData = { labels:…
-
0
votes1
answer616
viewsA: ASP.NET MVC error circular reference when serializing object
Circular references are an indication that your design has something strange, but a faster solution than refactoring your code is to use [Jsonignore] as you yourself mentioned in the comments.…
-
0
votes1
answer466
viewsA: Validate empty fields in XLSX file - (Epplus) ASP.NET
If you still need the resolution. I will reduce your method like this. public static List<ModularCostCapacitor> ReadFlieAndBuildModularCostsCapacitors(HttpPostedFile upLoad) { var…
-
2
votes2
answers88
viewsA: How video sharing sites perform autoplay with audio on Chrome
HTML5 itself has an attribute in the video tag of self-play <video controls autoplay> <source src="https://www.w3schools.com/TAgs/movie.mp4" type="video/mp4"> <source…
-
0
votes2
answers82
viewsA: How to access the data-weekday property of the div element with javascript?
To get an attribute from your div just use getAttribute("data-weekday"); specified in w3schools. Follow the demo. var x = document.getElementById("weekday").getAttribute("data-weekday"); alert(x);…
javascriptanswered Netinho Santos 2,366 -
0
votes1
answer66
viewsA: Difficulty with Ajax Jsonp
In your Ajax include the cache: true see here why In Browser Console I noticed that it adds two parameters that I did not pass :callback=jQuery21409543886738626624_1528899809074 and…
-
0
votes1
answer52
viewsA: View select ASP.NET Sqlserver
With your typed View you can in your Action gives a return View(contacts); and then in your View: @model OrderViewModel @{ Layout = "~/Views/Shared/_Layout.cshtml"; } <div> Conteúdo da View…
-
1
votes2
answers129
viewsA: Register an "admin" user when running the c# mvc application
If you’re working with Code First can use Entity Seed. To enable it to perform on Nuget: Enable-Migrations protected override void Seed(ContosoUniversity.DAL.SchoolContext context) { // This method…
-
0
votes3
answers28
viewsA: How to access the data-opened property of each div that is inside an array ? Jquery/Javascript
$(document).ready(function() { var bares = new Array(); $('.bares').each(function() { bares.push($(this)); }); for (i = 0; i < bares.length; i++) { console.log(bares[i].attr('data-opened')); }…
-
4
votes2
answers501
viewsA: C# | Enlarge the Console Application window
You can use the method Console.Setwindowsize of the Console class to define window dimensions. static void Main(string[] args) { Console.SetWindowSize(10, 5); Console.ReadKey(); }…
-
0
votes1
answer24
viewsA: Error deleting - 1.9 Application Termination: Operation Delete
Check if the object to be removed in the list actually exists. [HttpPost] [ValidateAntiForgeryToken] public ActionResult Delete(Instituicao instituicao) { var instituicao = instituicoes.Where(c…
-
0
votes2
answers199
viewsA: Capture URL that is inside a div with Jquery
Your problem is the div parent level and the this operator. Put the 'single-project' class in the tag <a> from which you want to extract the URL and where the click is triggered.…