Questions tagged as 'asp.net-mvc'

1
answer

Asp.Net MVC Project in Medium-Trust

I have a project in Asp.Net MVC using .NET Framework 4.5, but my host is shared and has a security policy that only allows Medium-Trust (save Locaweb). When you publish the application, even if you change the Web.config to Medium-Trust, the a...
asked by 10.11.2015 / 11:43
1
answer

Define the selected value in a SelectList (DropDownList)

I have a list of vehicle models: private List<ModeloRastreador> modelo = new List<ModeloRastreador>(); I add the result that came from the bank foreach (var m in modelo) { modeloRastreador.Add(new SelectListItem {...
asked by 14.10.2014 / 17:05
1
answer

Entity Framework - N for N, clear list

public class Aluno { public int AlunoID { get; set; } public virtual ICollection<Turma> Turmas { get; set; } } public class Turma { public int TurmaID { get; set; } public virtual ICollection<Aluno> Alunos { get; set;...
asked by 29.09.2014 / 14:29
1
answer

Set Home Page in IIS

When we deploy in IIS with an MVC 5 application, I need to set the homepage, right? In my case I have the Views = > Home = > Index.cshtml. In my case, I go to Default Document and how do I put all this step to inform the index page? I put...
asked by 07.10.2014 / 13:12
1
answer

Database query in C # mvc

How is the syntax or how do I convert a multi-joins query to a search in my application in C # asp.net mvc? Example: I have a form with the following controller public ActionResult Pesquisa(int id = 0) { var resultado = co...
asked by 30.06.2014 / 22:20
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
1
answer

ASP.Net MVC application does not connect to the database

I'm developing a solution in object-oriented programming class for web. Let's create a stock control system. One of the first "screens" of access, is the login, only that at the moment, my whole 'application' already goes down. In the first...
asked by 11.09.2014 / 00:50
1
answer

Map associative tables in Entity

This has already happened. When I use an associative table in Entity, these tables generally do not have PK. When this occurs, I can not map them. How can I map this type of table?     
asked by 15.08.2014 / 14:46
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
2
answers

Devexpress spin - culture info

I'm using the spinedit of devexpress, with MVC, it's a decimal field, but I need the punctuation of the number to be a period and not a comma, I need to put his culture as "en-US", how to do it? / p>     
asked by 11.08.2014 / 15:01