Questions tagged as 'asp.net-mvc'

1
answer

No route in the route table matches the supplied values

I have the following route settings: [HttpPost] [Authorize(Roles = "Perfil Administrador, Master")] public ActionResult AlterarHospital(int id, string url) { var rota = url.Split('/').ToArray();...
asked by 02.03.2017 / 15:30
0
answers

Start Async function

Good morning, I do not have much knowledge about async, and maybe someone could help me regarding this: public async Task<ActionResult> IndexAsync(CancellationToken cancellationToken) { var result = await new AuthorizationCod...
asked by 03.04.2017 / 15:31
1
answer

The Web server is configured not to list the contents of this directory

My project was running smoothly when I needed to split them into Areas. Then all my old controller (which was running perfectly) was migrated to a certain Area. Mapped the areas and even upgraded RouteConfig. However, it is giving this error....
asked by 16.03.2017 / 14:23
2
answers

Pass Token by the header to each request AngularJS (Authorization)

I have the interface-factory.js file that is my factory app.factory('interfaceAPI', function ($http) { var _getInterface = function () { return $http.get("/api/interfaceapi/getall"); }; var _postInterface = function (objeto) { return...
asked by 16.03.2017 / 14:53
2
answers

Validation when editing an existing file?

I have a following problem: I'm moving the part of controller of my system in the part of edit registers and it does the following verification, if I type an already existing code, it displays a alert . ModelState.AddModelError("User...
asked by 24.02.2017 / 14:40
2
answers

jQuery AutoComplete with GenericHandler Error 404

I'm doing an input with an AutoComplete function, but typing it returns on the console with a 404 error. Here's the code: $(document).ready(function () { $("#ListaNCM").autocomplete({ source: "ListaAuto.ashx" }); }); And the Generic H...
asked by 03.03.2017 / 14:34
3
answers

create java script functions after rendering all partial views

I have a MVC aspnet code with a main view that can call 3 partials view depending on where the user clicks. One of these partial view was part of the main view and has a jquery pluguin sortable ui, while it was in the main view the pluguin wo...
asked by 22.02.2017 / 00:46
2
answers

ListModel ActionResult () MVC

Personal I need a help to understand where I'm going wrong and how to fix a problem. I do not handle a lot of MVC, but I'm turning here. I need to pass a Model class as a parameter to an ActionResult, but the variable is being sent empty....
asked by 21.02.2017 / 17:06
3
answers

DataAnotation Attribute for Currency

I would like to format with DataAnnotation currency but default en in the model: [Column("cur_mensalidade")] [DataType(DataType.Currency)] [DisplayFormat(DataFormatString = "{0:C0}")] public decimal? Mensalidade { get; set; } but does no...
asked by 03.05.2016 / 14:34
0
answers

Error using numeral.js in Asp.Net MVC application

I am trying to convert the table data to the correct monetary value, and I am using numeral.js, I have the following script @section scripts{ <script src="~/Scripts/jquery.bootgrid.js"></script> <script src="~/Scripts/n...
asked by 08.03.2017 / 14:57