Questions tagged as 'asp.net-mvc'

1
answer

Pass image to HTML via ViewBag

I have an image in an array of bytes, and I need to insert it into view . Is there any way I can do this through ViewBag ?     
asked by 10.04.2017 / 16:50
2
answers

Fields in the same line Bootstrap application MVC5

I would like a hint of putting two fields on the same line in Razor, using the bootstrap in an ASP.NET MVC5 application. div class="ibox-content"> <form role="form" class="form-inline">...
asked by 26.07.2016 / 21:15
1
answer

What is the advantage of using Tag Helpers in ASP.Net Core?

I'm studying ASP.NET Core and came across the tag helpers when I generated the scaffold of a view . I found the new syntax interesting, the code is more readable on some points, however, adding another DLL to all views that used tag help...
asked by 30.12.2015 / 13:25
1
answer

MVC Helper with Generic List

I'm creating a Helper in my Asp.Net MVC 5 project, and I'd like to get a generic list as a parameter, but the following code snippet does not work: @helper MeuHelper(string param1, int param2, List<T> param3) { // Sequência de código...
asked by 28.12.2016 / 20:28
1
answer

How to save files on separate servers by extension

I have a WEB API that receives a file via POST it follows the Controller code: public async Task<HttpResponseMessage> Post() { // Ver se POST é MultiPart? if (!Request.Content.IsMimeMultipartConten...
asked by 06.01.2017 / 18:27
2
answers

Error creating data with foreign key

Hello, I am not able to insert data into a table that has foreign key, follow my model: 2tables,DepartamentoandFuncionario,theemployeehastheforeignkeyIdDepartamento.AndImanagedthecontrollerseverythingright,Icanaddadepartmentwithoutproblems,b...
asked by 18.11.2015 / 19:40
1
answer

Error when running Updad-Database command

When I run the Update-Database command in the Package Manager Console, I get the following error:    Value can not be null.   Parameter name: entitySet I have only one model in the project for now public class Project { [Key]...
asked by 27.10.2017 / 15:01
1
answer

jquery Intellisense does not work in VS2015 Community

I can not make it work at all. My _references.js /// <autosync enabled="true" /> /// <reference path="bootstrap.min.js" /> /// <reference path="jquery.mask.min.js" /> /// <reference path="jquery.validate.min.js"...
asked by 02.02.2017 / 22:08
1
answer

How to integrate TinyMCE with ASP.NET MVC

Implementing TinyMCE into ASP.NET MVC encountered a problem uploading images . The form I'm trying to implement is as follows: I have a View with Script that calls a Controller containing a upload metho...
asked by 30.01.2017 / 23:44
1
answer

How to print text within an @if {} condition in Asp.Net in the cshtml file?

I have the following situation <td> @Html.DisplayFor(modelItem => item.HoraInicial) às @Html.DisplayFor(modelItem => item.HoraFinal) <br /> @Html.DisplayFor(modelItem => item.HoraInicial2) @if (!item.HoraF...
asked by 27.01.2017 / 23:56