Questions tagged as 'asp.net-mvc'

0
answers

Center TextBoxFor with column icon

I'm trying to create a centralized login form, but with the code below the input text is aligned to the left and the icon to the right: <div class="form-group"> <div class="row"> <div class="col-md-4 col-md-offset-4">...
asked by 24.08.2017 / 16:21
1
answer

Persist the same record by different user [closed]

I've seen what it's like, but I do not remember how it does and not a key word for me to search. Suppose different users edit the same record, when the last user persists the information in the database, I want to show a message that this rec...
asked by 30.08.2017 / 14:20
0
answers

How to create a txt file and download?

I use the following code to generate a txt file in Windows Forms: StreamWriter file = new StreamWriter("D:\teste.txt"); List<Producao> bpa = ProducaoDados.BuscarBPAC(txtCompetencia.Text); foreach (Producao linha in bpa) { file.Wr...
asked by 21.08.2017 / 00:27
3
answers

Send email asynchronously asp.net mvc

I have a form that returns ActionResult that sends an email after completing the operation. I would like to leave this email asynchronous, because it takes a lot of the time, I tried to put it in a Task using the SendMailAsync method of...
asked by 04.09.2017 / 23:51
1
answer

Error CS0246 when creating a new asp.net mvc core application

I have a problem, when creating a new asp.net-core project in visual studio 2017 the following error appears when compiling:    Error CS0246 The name of the "System" type or namespace can not be   (is missing a using directive or a   assembly...
asked by 05.09.2017 / 18:01
0
answers

Number of files in the request with Moq

The SetupGet to for the form ( Form ) of the request works, however Count does not work. How do I resolve to Count return the desired value? var httpContextMock = new Mock<HttpContextBase>(); var request = new...
asked by 08.08.2017 / 16:44
1
answer

ASP.NET MVC + Entity - Mapping New Tables

Good morning, I have a project using ASP.MVC + EF and I mapped about 20 tables using the VS wizard (creating ADO.NET Entity Data Model , selecting the database and tables I want), but now I have 16 more tables to insert in...
asked by 23.08.2017 / 14:33
0
answers

View message error

I have this code: $.ajax({ url: "/InternalAuditRecord/SaveInternalAuditRecord", type: "post", data: $("form#internalAuditRecordRegisterForm").serialize()+"&idResponsibles="+responsibles+"&am...
asked by 20.07.2017 / 13:24
0
answers

Insert user via ASP.NET Identity

I'm developing an application in ASP.NET where I'm using Identity . I have some initial functions coming from an external API that are called when I am validating the Token of this API via% p> The fact is that I need it i...
asked by 31.07.2017 / 03:08
0
answers

Error generating migration after changing a relationship

I'm having an error changing a many to many relationship in the entity framework I had 3 classes: Policy 1-n Normative Policy n-1 Normative I did not want to map this auxiliary table in the hand, so I deleted the class PoliticalNor...
asked by 29.08.2017 / 14:37