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

1
answer

Call an asynchronous function in an ActionResult?

How to call an asynchronous function on a non-asynchronous controller, to be clearer follows a situation: I have a form that when saving it needs to save data in the database and simultaneously send an email notifying a user that such action...
asked by 04.03.2016 / 13:37
1
answer

How to make substring SelectListItem?

Follow the code: View: @model IEnumerable<Projeto.Models.Model> <table class="table table-striped"> <thead> <tr> <th> @Html.DisplayNameFor(model => model.Id)...
asked by 08.01.2017 / 19:32
1
answer

I can not save a Dictionary

I have a page that may have access not allowed, open for reading or open for reading and writing. Although the page is completely closed, the owner of the page can choose some users of the system that can have access to it. These exceptions can...
asked by 23.12.2015 / 20:04
2
answers

Persistence using Fluent API

How do I persist an address without having to pass all client information? Below is my address client mapping: HasMany(f => f.EnderecoList) .WithMany(e => e.ClienteList) .Map(me => {...
asked by 28.09.2015 / 18:13
1
answer

How to force login after running the application?

My scenario is as follows: After authentication with Active Directory, the logged-in user is saved in a Session [HttpPost] public ActionResult Login(LoginModel model, string returnUrl) { if (!this.ModelState.IsValid) return View...
asked by 21.10.2014 / 21:14
1
answer

Partial does not render

I have a problem with my application. What happens is that I am not able to render a partial in another view. Here is the partial code: @model CEF01.Models.Ocorrencia @using (Html.BeginCollectionItem("Ocorrencia")) { @Html.HiddenFor(mo...
asked by 15.05.2014 / 01:54
1
answer

Refresh edmx from the database

I did an update model from database on my edmx. Well, the field I had added to the table appears in the diagram, but in the cs of the non-entity, it continues with the old fields. What do I do, I add in my hand? This is my cs public partial cl...
asked by 06.05.2014 / 19:59
1
answer

Individual User Account between MVC and WebApi projects

I have an MVC project with Individual User Accounts, I use Roles for access management and everything works fine. I recently had the need to create a file manager on another server, I created a WEB API project and I communicate via HttpClient, t...
asked by 04.06.2017 / 18:52
1
answer

Format @ Html.Label - MVC

In my page I have one: @Html.ActionLink(linkText: "Bem Vindo(a) " + User.Identity.GetUserName() + "!", actionName: "Index", controllerName: "RelatorioTagModels1") What it generates, the "Welcome" page below: ButIdonotwantittobealink,Iju...
asked by 19.02.2017 / 02:36
1
answer

Request ajax

I'm loading the menu, of the system I'm developing, through a request via ajax using jQuery, however the menu formatting is not getting as expected. My request via jQuery <script type="text/javascript"> $(document).ready(function...
asked by 19.12.2014 / 13:18