Questions tagged as 'asp.net-mvc-5'

1
answer

Problem with Mascara Currency and calculation

I have a function that is called here: $("#valorPrimeiroPedido").focusout(function () { var valor = $("#valorPrimeiroPedido").val(); calcularValorMercadoria(valor); }); $("#valorPrimeiroPedido").val() alrea...
asked by 05.04.2018 / 16:30
1
answer

When to use Html.BeginForm () and why to use?

I came across the following situation in one of the views I have a search field: <form class="navbar-form navbar-right" role="search"> <div class="form-group"> @Html.TextBox("parametroProcura") &...
asked by 13.07.2017 / 22:17
1
answer

@ Html.DropDownListFor how to set the default value

I need to set the default value displayed by a @Html.DropDownListFor Searching found: @ Html.DropDownListFor how to set default value So, I did it in my code: @Html.DropDownListFor(model => model.equipe, new SelectList(ViewB...
asked by 01.08.2017 / 13:59
1
answer

Globalize - datetime does not work with pt-BR

Please, follow code: Global.asax: protected void Application_Start() { System.Globalization.CultureInfo.DefaultThreadCurrentCulture = new System.Globalization.CultureInfo("pt-BR"); AreaRegistration.RegisterAllAreas();...
asked by 09.08.2017 / 03:46
2
answers

How to insert data with JSON and MVC5

I have a registration screen where the user can enter as many emails as he wants in each record. For this, in my View I have the following code <div class="form-group"> <button type="button" id="btnAddEmail">Adicionar</b...
asked by 21.08.2017 / 22:28
2
answers

My Intranet Project Security

I have a commercial intranet project, but how can I validate that my project is not copied from the root folder, where does IIS run? So if my client has a knowledge he could easily copy my system to play on the pendrive and resell it, am I right...
asked by 21.02.2017 / 16:51
2
answers

Json Method - Return

I am developing a return of zip codes through the Post API, the part that is in the controller is working, but I do not know if the return is correct, nor how to use it in the view. If anyone can give me a Light I'm grateful. Controller:...
asked by 18.11.2016 / 03:21
1
answer

Confirmation of registration data E-mail Password

I would like to know the best way to validate E-mail and password, to verify that the user has correctly entered the information. Ex:    Enter your email:       Confirm your email:       Enter your password:       Confirm your password:...
asked by 10.11.2016 / 20:16
1
answer

Problem to insert into the database - SQL

Follow the code: Update command works: int noOfRowUpdated = ctx.Database.ExecuteSqlCommand("Update Mapa set Geo = geography::Point(47.65100, -122.34900, 4326) where Id= 1"); What does not work is insert command: int noOfRowInserted = c...
asked by 07.01.2017 / 04:55
2
answers

SQL Injection or Script injection - MVC-5 - Is it a concern?

I am developing an application in MVC-5 and I have read several articles on SQL Injection. I would like to know if I have to take any security measures or modify my selects, or if the MVC-5 already has a shield against this situation. Thro...
asked by 05.01.2017 / 22:18