Questions tagged as 'asp.net-mvc'

1
answer

Field TextBox Search Enterprise and Category and Field DropDownList Cities Search Cities How to Make Includes in SQL - Asp.Net MVC

I developed a Code First system in Asp.Net MVC In this development I created a relationship very much and I want to do a research that includes these relationships in a research, I describe below better in code what I have developed In...
asked by 25.10.2017 / 02:08
1
answer

Execute Action Post by JQuery ASP.NET MVC

I would like to delete a record in a button click by Jquery, what is the best way to do it? The way I did it is not working.    Action I want to call by Jquery // POST: Pais/Delete/5 [HttpPost, ActionName("Delete")]...
asked by 25.10.2017 / 18:43
1
answer

Problem has no key defined. Define the key for this EntityType

Tested having problem with relationship between department and employee tables This returning 2 error: - "EntityType '' has no key defined. Define the key for this EntityType." -Official 'is based on type' Official 'that has no keys defined....
asked by 11.11.2017 / 15:29
1
answer

AJAX success return incorrect

I'm using Jquery AJAX in my ASP.NET MVC application and I'm having a rather strange problem. When performing an AJAX request, instead of being retuned the content I want to load (a new ".cshtml" page) is returned the same content as the current...
asked by 30.11.2017 / 14:11
1
answer

Problem with DateTime field in ASP.NET MVC POST

DateTime field getting 01/01/0001 00:00:00, not the date before POST.    DataTime Field with DataAnnotations (MODEL) [Required(ErrorMessage = "Campo Data de cadastro é obrigatório.")] [Display(Name = "Data cadastro")] [...
asked by 20.10.2017 / 16:32
1
answer

ASP .NET MVC - Use an @Html.DropDownList for two ActionResult

Hello, I'm developing an application with ASP .NET MVC and using the EPPlus API for XLS export. In the View of an equipment report I have two @Html.DropDownList with Equipment Type and Status respectively. To display the report...
asked by 19.10.2017 / 19:50
2
answers

CPF Mask and Birth Date Asp.net MVC

My question is this: I created a simple CRUD and I am wanting to use masks in the fields of birth date, CPF and telephone. Functioncode%ofCRUD%:@modelWebApplication1.Models.Bdfinal@{ViewBag.Title="Create"; Layout = "~/Views/Shared/_Layout.c...
asked by 09.10.2017 / 03:49
1
answer

Add Action and Controller in BeginForm's HTMLHelper with T4

I need to add template and controller values to my T4 template, but I can not figure out how to pass the their names. Here's an example: CREATE.cs.t4 @using (Html.BeginForm("Create", "RamoAtividades", FormMethod.post, new {@class =...
asked by 06.09.2017 / 03:13
2
answers

Error 403 access denied when I do not use https

I created a site in ASP.NET MVC and uploaded my files to my hosting plan. There I am entitled to a Let's Encrypt certificate for free. After activating it, an error occurred: If I access my site like this: link works normal. But i...
asked by 01.09.2017 / 00:42
1
answer

Binding from View to Controller does not work in "disabled" fields [duplicate]

I use the asp-for property in the elements of my View to pass their values to Controller at time of post of the page. <input id="txtExamNumber" asp-for="ExamNumber" class="form-control" /> What I noticed...
asked by 23.08.2017 / 19:52