Questions tagged as 'asp.net-mvc'

0
answers

Error in numeric field MVC Asp.Net

I am having problems with Asp.NET MVC when using numeric field I am having error. Razor is like this @Html.EditorFor(model => model.AliqIpi, new { htmlAttributes = new { @class = "form-control", @style = "text-align: right;", @t...
asked by 09.10.2018 / 00:06
0
answers

CNPJ Field with Mask

I'm a beginner in both ASP.NET and jQuery. I need to include a mask in the CNPJ field of my View, but I can not. I'm going to post my code and someone, please tell me where I'm wrong. Bundle using System.Web; using System.Web.Optimization...
asked by 29.09.2018 / 21:14
0
answers

EF Code First Error MySQL

I'm doing codefirst using mysql. When I run the update-database the following problem occurs: Target database is: 'DBContext' (DataSource:. \ SQLEXPRESS, Provider: System.Data.SqlClient, Origin: Convention). System.Data.SqlClient.SqlExcep...
asked by 30.09.2018 / 02:41
0
answers

Set monetary value field correctly in Asp.Net MVC

I'm having problems with monetary value in my Asp.Net MVC application and would like to know how to configure In class [Display(Name = "Valor Produto")] [Required(ErrorMessage = "O campo {0} é obrigatório")] [DataType(DataType.Currency)] pu...
asked by 28.09.2018 / 19:09
0
answers

Opinion on architecture using Dapper

In a project, I have some standard methods, for example: //Execute Return List DapperORM.RetornoList<EmployeeModel> <= public static IEnumerable<T> RetornoList<T>(string procedureName, DynamicParameters param = nul...
asked by 20.09.2018 / 16:39
0
answers

Problems removing items from a ListViewModel when the row is removed using JavaScript

I have a contact list that is loaded dynamically using razor and Javascript to remove the rows and reorder the positions of the fields. The problem occurs when I click the delete record button and delete all the contacts (I send an ajax request...
asked by 19.09.2018 / 01:57
1
answer

Using Identity with Entity Framework to make one-to-many relationship with other tables

In my scenario a user has several boats and a boat has several notes. So I need to relate the user to the boat so that this user can see these notes. I'm using the MVC 5 default identity template. So I need to relate the AspNetUser table t...
asked by 25.09.2018 / 21:12
1
answer

Redeem Cookie values

Good afternoon I have an application in MVC that generates some cookies, I would like to know if it is possible to recover these cookies through an Api, as I tried and unfortunately could not. Code generated for api: [Route("ResgataCookie")...
asked by 25.09.2018 / 21:27
1
answer

Name property does not work using Razor HiddenFor

I am creating several fields dynamically using Asp.net Razor and for this I am passing the index to a partial view and setting the name property of each field. Everything is working fine with all fields except Id and PersonId which are built usi...
asked by 18.09.2018 / 02:36
0
answers

Include direct in input select - MVC

I have this select field, where I load the database data: <label asp-for="CategoriaID" class="col-md-2 control-label"></label> <div class="col-md-6"> <select asp-for="CategoriaID" asp-items="@Model.CountryList" class="...
asked by 17.09.2018 / 15:08