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

1
answer

"Untrusted domain" error when trying to connect to the database

When trying to connect to the database, I get the following error:    Login failed. The login is from an untrusted domain and can not be used   with Windows authentication. I'm using MVC 5 and below is my connectionstring . I'm not...
asked by 23.10.2014 / 21:33
1
answer

How to "escape" the @ in Razor

I'm trying to leave @ as a string. Here is the code: hint: { mentions: ['Pedro', 'Tiago', 'João', 'Maria'], match: /\B@(\w*)$/, // Problema com @ search: function (keyword, callback) { callback($.grep(this.mentions, function (item) {...
asked by 12.12.2016 / 23:26
2
answers

Adding text box and saving to the bank. (with C #, entityframework 6.1.3)

I'm doing a project in Visual Studio 2013, with EntityFramework version 6.1.3, MVC 4.5.0.0 and using ViewModel . I'm programming a page called payment condition. The creation page will have a text field nome , 2 radiobuttons : "t...
asked by 21.09.2015 / 16:04
1
answer

Send via FormCollection of monetary values

I need to send to a method in the Controller the values filled in the Payment_Value column as shown below: HomeWhenclickingthegreenbutton,sendviapost,thevaluesofthelistbelowthatgeneratedthetable:@foreach(variteminModel.vmListPagamentos){<...
asked by 24.09.2015 / 23:03
1
answer

Correct use of async and await in Asp.Net

I am creating an asynchronous method for sending Emails from the opening or changing of the object, but when calling the method of sending mail I have to put await in front and the return of the method has to be async Task, do this in the contro...
asked by 03.09.2015 / 20:24
2
answers

How to put an image in an HTML button

I'm creating a button on a particular page and would like to put a background image. I'm trying to use the background-image:url() tag in CSS but it's not working. HTML: @model WebApplication3.Models.Comercial.ComercialModels @{...
asked by 23.10.2016 / 18:01
3
answers

What is the difference between a web service in the same project and a different project in the same solution?

Everyone tells me to create a REST and not SOAP. I know I'm just going to get it right. I took an old project in the company where I am with a web service in the same project. As I'm using MVC, I created a web service and I came across...
asked by 28.04.2014 / 15:38
1
answer

When mapping class to viewModel, some data is lost

I have a query that returns a client and its phone, but when mapping the class to the viewModel , I lose the phone data: query: public Cliente ObterClientePorId(Guid ClienteId) { var consulta = Contexto.Cliente.Join(Conte...
asked by 27.08.2015 / 20:18
2
answers

Filter on where the largest date with LINQ

As I pass in the where of this linq to max datatransaction, ie, I want to bring the result but for the greater date. var resultado = (from ci in webDB.T_Controle_Importacao where ci.CNPJ == cnpj...
asked by 06.05.2014 / 01:13
1
answer

Login with different profiles

I'm developing an application for a school, where you control what students have. The application makes the student registration and registration of occurrences (suspension or warning) that the student did. And in that context, I need to login d...
asked by 22.05.2014 / 15:29