Questions tagged as 'asp.net-mvc'

2
answers

404 Error Page in IIS

Good afternoon, I've developed a system and I have a logic that does not allow profiles that are not authorized to access parts of the system that are not allowed for it. What happens is that when trying to access an area that is not allowed, II...
asked by 23.06.2014 / 19:38
3
answers

Alert message in asp.net mvc

I have a form in Asp.Net MVC that terminates as follows <div class="modal-footer"> <input class="btn btn-primary" type="submit" value="Salvar" /> <a class="btn btn-default" onclick="FechaModal();">Cancelar</a> &...
asked by 24.06.2014 / 14:49
2
answers

How can I do to get the insert in the log with logged in user? Identity - Asp.net core 2.0

I need to get the user logged in, to do an insert in the log, thus including which user included in the table, made change, and delete. I'm learning language, and I still have a lot of questions. This is my AccountController controller: pri...
asked by 10.07.2018 / 16:50
1
answer

Local Bank Storage Method

I have a local database on my desktop, I made an application development using C# and Asp.Net MVC and I thought I would only have the job of migrating to some MS SQL database when I was uploading the project. However, I need to...
asked by 16.10.2014 / 17:17
1
answer

Uploading multiple files using Uploadfy in ASP.NET MVC

How to implement multi-file upload with uploadf ? I find it very interesting to use the upload bars etc. is giving this error: Thisismycontroller: You may notice that you have many error messages as well. View Code: <script t...
asked by 13.03.2014 / 21:29
3
answers

Pass ViewBag to _Layout

I need to pass a list to my layout where it is used on all my pages, would you like to know how I could do this?     
asked by 11.06.2015 / 15:20
1
answer

Perform a redirect on Builder

How can I make a Response.Redirect() in a class constructor? public class FarmaciaController : Controller{ public FarmaciaController(){ if(!userLogin.usuarioTemPermissao("Farmacia")) Response.Redirect("~/PortalFarm...
asked by 09.06.2015 / 18:38
1
answer

The name 'Component' does not exist in the current context

I'm trying to create a view component to reuse on pages, I'm trying to follow some video tutorials. I have already installed via nuget the entire Microsoft.AspNetCore.Mvc, but when I try to call it from the viewpage, using @Component.InvokeAsy...
asked by 06.06.2018 / 16:57
1
answer

Doubt about modularization in MVC Application

Friends, I always try to focus on good programming practices, and one practice that confuses me most is Modularization . For example, I have the method below that receives data from an API and sends View to this collection. Well: in this met...
asked by 02.03.2018 / 14:52
1
answer

Is it possible to insert parameters in the filters attributes?

I use ASP.NET and to do access control by level, I use a filter that checks the user's permission level and allows access to view . [HttpPost] [AutorizacaoFilterAttribute] //Esse filtro analisa a permissão do usuário public ActionResult GetEm...
asked by 08.05.2018 / 17:17