Questions tagged as 'asp.net-mvc'

1
answer

How to dynamically grab the directory from the Content folder?

My question is the same as the title: how do I create a variable that points to the Content folder? I have a file there and I want to access it. I tried this way, but without success: StreamReader file = new StreamReader(@"~/Content/tb_ocup...
asked by 23.06.2017 / 00:28
2
answers

Javascript variable value assignment

I have the JS code below and the JSON return does not assign the value to the variable texto . I ran a test with alert(data.frase) and the message came normally. Does anyone know why var texto does not get the value of...
asked by 29.03.2017 / 17:32
1
answer

Get HTML href attribute in C #

I have the following code in a Razor view: <div id="HTMLreturned" class="row"> @Html.Raw(ViewBag.HTMLreturned); </div> <script> var nrLinks = 0; $(".enlacesMas > a").each(function(){...
asked by 16.03.2017 / 18:10
1
answer

Include optional Entity Framework

I have a big question here with regards to Include of the Entity Framework. var ocorrencias = db.Ocorrencia .Include("Pessoa") .Where(c => c.Id > 1000).ToList(); I used Include because I need the object...
asked by 22.03.2017 / 01:26
1
answer

Upload to Drive [closed]

Personal I have the following code, which opens the consent form of google, where the authorization of the user is made and an authentication token is generated: public async Task<ActionResult> IndexAsync(CancellationToken cancellationTo...
asked by 04.04.2017 / 19:12
1
answer

How to select multiple button radios in the same column as an html table?

I have a table html with 3 columns and 3 lines and when I select, for example radio button of line number 2, line number 1 uncheck. @if (Model != null && Model.Tabela1!= null && Model.Tabela1.Count > 0)...
asked by 02.10.2017 / 19:07
2
answers

Filtering for empty children

I have two entities ( TipoDeRequerimento and TipoRequerimentoSituaçãoAcademica ) in my query. Today I can make a filter to bring the Types of requirements that have a certain academic situation pre-registered. Now I need this filt...
asked by 04.10.2017 / 02:23
3
answers

Sending temporary information between classes with C # 4.0 MVC 4

Working with a VS 2015 solution that has 2 sites, "projectA.site.com.br" and "projectB.site.com.br", their views and controllers are in the same project, named as "WEB", developed in C # .NET 4 with MVC 4, but in two folders, "Project A" and "Pr...
asked by 18.01.2017 / 13:58
3
answers

Problems with View Model Implementation

I'm trying to use the View Model Pattern concept, but when I'm implementing the compiler it's having a conversion error. Below is the approach I used: Viewmodel structure public class EvolucaoViewModel { public Chamado ChamadoAtual {...
asked by 31.05.2017 / 21:01
1
answer

Bootstrap - How to increase the input column size?

Follow the code: On the index page: <!-- Modal --> <div class="modal" id="minhaModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lg" role="document">...
asked by 06.02.2017 / 19:09