Questions tagged as 'asp.net-mvc'

2
answers

Error converting decimal value in Insert C #

I have an insert that receives some parameters, but at the moment that the sql statement is giving this conversion error:    Error converting data type varchar to numeric. //http://localhost:7630/api/AspNetWebApi/cadastrar/jogo/451...
asked by 06.01.2016 / 15:19
1
answer

Do a query and see in a dropdownList

You are giving the error below in dropdowList and I do not understand why. Error:    Can not bind the object of type 'System.Collections.Generic.List1 [
asked by 15.12.2015 / 17:42
2
answers

How to compare with Guid Mvc

Hello, I would like to make this comparison using a Guid , public Guid ClienteID {get;set;} . This code works by using int , I if , if my ClienteID == 0 I saved, and if not equal to 0 I change. I want a way to d...
asked by 05.06.2016 / 11:14
1
answer

How to pass ID via JavaScript to a View

In the application I'm developing I use Views of type modal . I use this code to display the modal : <button class="btn btn-default details" data-id="@clientes.Codigo"><i class="glyphicon glyphicon-file"></i></button&g...
asked by 15.10.2015 / 02:35
1
answer

Difference between Render Partial and Render Action

I'd like some help to better understand these types of partial view rendering.     
asked by 05.03.2016 / 16:38
2
answers

Pass value from Select html to Controller via Post

I have a form where I pass some fields via Helper. Ex:<divclass="form-group col-md-6"> @Html.LabelFor(model => model.Nome, new { @class = "control-label col-md- 6" }) @Html.EditorFor(model => model.Email, new { htmlAttribu...
asked by 01.03.2016 / 21:16
1
answer

Abort an Ajax request

In a situation where I use ASP.NET MVC , can you cancel a AJAX request depending on the response of a modal? I'm doing something like this: function atualizaStatus(sel, id) { var $status = sel.value; var $idAluno = id;...
asked by 20.01.2016 / 14:02
1
answer

View with 2 models within a ViewModel

Objective : Manipulate 2 models in the view using a ViewModel. I made a ViewModel to encapsulate the 2 models, but I can not use one of them. ViewModel: public class BoletoConfigViewModel { public Boleto Boletos { get; set; }...
asked by 25.01.2016 / 21:33
3
answers

Incorrect date on return of json

Good afternoon, The return of Json brings the badly formatted date="/ Date (1420077600000) /", how to deal? {"TB1":1,"DTADMISSAO":"\/Date(1420077600000)\/"} ThisisthesectionwhereIsettheDatefield:$.ajax({url:"ObterFuncionario",...
asked by 22.10.2015 / 18:46
1
answer

Error "Access-Control-Allow-Origin header is present on the requested resource" [duplicate]

I need to insert an API on my site that provides the weather forecast for a particular city, however, the ajax request always returns the error in the browser console. Follow below: XMLHttpRequest cannot load http://developers.agencia...
asked by 07.08.2015 / 23:03