Questions tagged as 'asp.net-mvc'

1
answer

View within an area as default in MVC

How can I make a view that is within an area default when I run the application? Error that I'm getting: Mystructure: MyRouteConfigfile  WhatIdidbelowdidnotwork.namespaceWebApplication1{publicclassRouteConfig{publicstaticvoidRegisterRoute...
asked by 09.05.2016 / 16:02
2
answers

Error saving EF changes

Good evening, When trying to insert the data into the table it gives me the error "An error occurred while updating the entries. See the inner exception for details." var db = new Repositorio(); var perfilPessoaDB = Objeto.Conve...
asked by 13.07.2015 / 05:36
1
answer

Display 3 Models in a View

I have 3 Models and need to mount 2 (two) lists and a "Save" button: Class:TBProduct:publicclassTBProduto{[Key]publicintTBPRODUTOID{get;set;}publicstringDSPRODUTO{get;set;}publicvirtualICollection<TBProdutoFornecedor>TBProdutoFornece...
asked by 28.09.2015 / 21:10
2
answers

Webapi - TryUpdateModel or UpdateModel on an ApiController

I have the following situation, a Person class, with Id properties, Name, Birth, I want to implement a page that can update only the Person Name. My implementation should get a person by their Id, and change only the Name field. I did the bel...
asked by 29.09.2015 / 16:17
1
answer

Function Linq does not return List

Hello, I have an application and it does not return a list that I make SELECT via Linq-to-Sql The error can be in the SELECT that linq-to-sql is doing. SELECT [Extent1].[Codigo] AS [Codigo], [Extent1].[NomeFantasia] AS [NomeFantasia], [Ext...
asked by 04.09.2015 / 01:24
1
answer

Send UTC from DateTime Javascript to C #

I have an ASP.Net MVC project as follows: In my view I have a JavaScript variable that holds a date: var hoje = new Date(); In my controller I have an action which receives via AJAX the value of the JavaScript variable in a C # vari...
asked by 03.09.2015 / 16:37
1
answer

Destroy javascript tag

I have an Asp.Net MVC project structured as follows: Home On the Home page there are several links for other Actions and Controllers , and they return a PartialView that mounts all contents to modal . Home...
asked by 03.09.2015 / 17:00
1
answer

Display popup asking for authentication when clicking on screen component that is not allowed to change

How to create a mechanism for when the user clicks to try to change a date that is as datepicker and display a popup for authentication or something like that to make this change? If he has permission, he can, otherwise he can not. &...
asked by 27.08.2015 / 16:22
2
answers

How to create field dynamically with jQuery? [duplicate]

I have a function that I need to validate what the user typed, if it is true enable datepicker . But the way I did it is falling into the method POST of asp.net mvc . Is there a way to create a textbox d...
asked by 28.08.2015 / 19:13
1
answer

Asp Net MVC longPolling

I have a project asp net mvc 5, I checked that every second is made a request, passing those parameters = transport=longPolling&connectionToken="" , and as a response comes {"C":"d-5B01A8B9-CN,0|Dw,B|Dx,0","M":[]} , what would th...
asked by 24.08.2015 / 21:59