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

1
answer

What is the difference between [AcceptVerbs (HttpVerbs.Get)] and [HttpGet]?

What is HttpGet and what is AcceptVerbs(HttpVerbs.Get) ? Example: [AcceptVerbs(HttpVerbs.Get)] public ActionResult GetStatesByCountryId(string countryId) { return .... } Another example: [HttpGet] public ActionResult G...
asked by 26.12.2016 / 20:06
1
answer

Doubt when setting entity relationship

In one scenario, I have an address registration entity: public class Endereco { [Key] public int EnderecoId { get; set; } public string TipoLogradouro { get; set; } public string Logradouro { get; set; }...
asked by 04.12.2015 / 20:54
1
answer

C # MVC5 - Table with CheckBox and Different Actions

I'm working on a project where I have a page that lists some records, of which I'll 'thumb' some to perform batch actions, such as exclusion, status change, etc. How do I send this list of my records to different actions? My list is built l...
asked by 30.07.2015 / 19:24
1
answer

How to use Html.BeginForm with JavaScript / Ajax

I have a View to generate Report on my system and I'm using a BeginForm. The idea is when I submit the submit to my GridReport which is another View, load inside one that I have inside the ViewReport. I want to do it with Ajax, but I can not....
asked by 22.07.2015 / 13:56
2
answers

Passing data encrypted by URL in ASP.NET MVC

I need to pass a link, but I did not want to leave it too exposed, I would like to know how to Encrypt at least the id of the object. I created a class for Cryptography, but it generates "/" and this places it as a route in MVC.     
asked by 28.09.2015 / 22:08
1
answer

How to use @Html.ActionLink to create links to a multi-route?

I would like to use the @Html.ActionLink to create the following link: http://localhost:59278/video/categoria/new-movies/3 Being that my control is: [Route("video/categoria/new-movies/{page?}")] public async Task<ActionResult> Index...
asked by 05.11.2015 / 18:09
1
answer

Multitenancy with Entity Framework

I have my application, which shares the same database with all my clients. By separating them only by a column of the Empresa_Id table, all my actions, Save, List, Edit, Delete are done by my repository. In my repository I pass the...
asked by 13.10.2014 / 21:28
1
answer

Error sending file through PostAsJsonAsync method in Asp.Net MVC

In my Controller of a Asp.net MVC project I get from View an image of type HttpPostedFileBase and need to send Web Api using PostAsJsonAsync : var response = await client.PostAsJsonAsync("api/image", im...
asked by 26.06.2014 / 16:03
3
answers

Error while running my MVC application

This is the error: Linha 1: <%@ Application Codebehind="Global.asax.cs" Inherits="Util.MvcApplication" Language="C#" %> I had created another project called Util and started to give this problem. What I did, I removed the project...
asked by 15.08.2014 / 15:59
1
answer

What is and how does Claims in asp.Net identity work?

What is and how Claims works in asp.Net identity? In what real use example would we use Claims? What's the benefit of using them? Sample codes?     
asked by 27.08.2014 / 03:44