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

1
answer

How to return dynamic list?

How to return a List<dynamic> in ASP.NET MVC 5 and EntityFramework 6 For example I have an Object named User and mapped in my EDMX, when I do to bring the data dynamically type make an advanced query without returning an object o...
asked by 24.12.2014 / 18:16
1
answer

Query in several fields of the record in a single query

I'm developing an item list filter, and would like to filter by any term in the item record. I've seen this working on Angular, but I'm developing for ASP.NET MVC 5 and using the Entity Framework + Linq for queries. Has anyone ever been throu...
asked by 11.09.2015 / 15:34
1
answer

MVC 5 and EF 6 Put another form's view

Continue giving comment error null in this line: ViewBag.PostId = new SelectList(db.Posts, "PostId", "Titulo", comentario.PostId); Probably why you did not enter ModelState.IsValid . I'm doing a project there from college. My pro...
asked by 18.05.2014 / 16:18
2
answers

IF condition within _Layout.cshtml in MVC

I have two _Shared.cshtml (MVC masterpage type, I do not know the name) and both are pretty much the same, only the left menu is different. I would like to do only 1 and according to the querystring I will call the page I want to be th...
asked by 13.05.2014 / 19:11
1
answer

Customize Asp.net Identity - Multiple classes like User in Identity

We know that our user in asp.net identity is the class with name of ApplicationUser I would like to create other classes that inherit from it Because? Why, let's say I have the Client, Vendor, User class. I want them all to be users of...
asked by 22.05.2014 / 00:00
1
answer

How to use the @Html.ValidationMessageFor to change the class of the text box

I bought a bootstrap template, the validation of the controls is done by a class that leaves the controls red. This would be the form-group has-error classes Except that I've never used it that way, I'm used to using the code it genera...
asked by 21.10.2015 / 02:52
1
answer

asp net mvc 5 resize image

I need help resizing the image that I uploaded, do you have any suggestions? Model: public HttpPostedFileBase TypeImageFile1 { get; set; } View:                                                                                             ...
asked by 03.11.2015 / 20:34
1
answer

Performance on queries with string filter vs foreign key

I'm working on a Asp.Net MVC 5 project that uses code first and all entities have a property named UserId of type string . When I make queries filtering by a certain user ( Asp.Net Identity ) I do so: string cu...
asked by 20.08.2015 / 19:18
1
answer

More performative way to return data to View

In a view where we return a list of objects, and we need to demonstrate the quantity, such as a small report, using some conditions. What is the most performative way to return data to view ? Explaining better. When we return an obj...
asked by 24.07.2015 / 19:40
1
answer

Modal bootstrap MVC 5

I'm trying to use the modal of Bootstrap , but I can not make the window open in modal form with the page style, instead it opens as a page with no style and using the whole frame of the browser. Following page code: @model MyApplic...
asked by 23.07.2015 / 21:00