Questions tagged as 'asp.net-mvc'

1
answer

How do I make an IF and disable a field using script

I would like some help, wanted to make an IF to disable or enable a field that comes with a value of 1 or 0. $(document).ready(function () { $("#btnProduto").click(function () { $.ajax({ type: "POST", url: "Selecionar",...
asked by 26.08.2017 / 15:24
1
answer

How to pass more than one parameter to a Controller?

I'm needing support to pass more than one parameter to a Creation Controller. I have some models as below: Usuario : Brings the information of the user who opened the ex call. user_id, user_name Chamado : Brings the title, co...
asked by 19.03.2017 / 22:24
1
answer

How to know the link of the call View () .NET MVC

I have a controller with a view at the end to show details of a company. I am making a code that allows you to generate a url for the company details through goo.gl to make it easier and more enjoyable to share, and I need to put as a para...
asked by 23.02.2017 / 19:06
3
answers

Using the Case When Then command with Entity Framework

I have the following structure corresponding to a table in my Database: Cat_Codigo, Cat_Descricao, Cat_Observacao, Cat_Status Where Cat_Status is defined by 0 or 1, where 0 -> Disabled and 1 - > Active. But I do not want to...
asked by 22.02.2017 / 15:40
2
answers

Catch a selected item in Dropdownlistfor using an ASP.NET MVC ViewModel

I'm trying to register a Subcategory that needs a Category. I have the SubCategoryViewModel, where I created the public IEnumerable<CategoriaViewModel> Categorias { get; set; } and public Guid CategoriaId { get; set; } fields...
asked by 17.02.2017 / 01:06
1
answer

Display text coming from the database query in @ Html.Actionlink ()

Well, I have the following scenario: I query the database and I bring a IEnumerable<> to View : <section class="container"> <article class="row"> @foreach (var item in Model) {...
asked by 03.02.2017 / 03:52
1
answer

What is Accelerated Mobile Pages (AMP)?

By chance I ended up reading in an administration portal where I talked about digital marketing trends for the year 2017 and what caught my attention the most was the AMP. What got me the questions. What AMP? How to integrate it into an...
asked by 07.03.2017 / 15:56
1
answer

ControllerContext Null

I have the following code: PDFController Ctrl = new PDFController(); byte[] ArquivoPDF = Ctrl.GerarPDF(xml); This part above is in WebApi, where I create a new instance of the Controller to use the function that is in it. The c...
asked by 10.03.2017 / 18:21
1
answer

Insert indented text in TextArea with CodeMirror

I'm doing a HTML editor in the browser, where the user can write his script to the database, I recorded all the lines of user code in a single string and recorded it in the DB, but how do I bring it back as user created? Currently it l...
asked by 09.01.2017 / 22:47
1
answer

What does each thing do in this method? (Mirror Audit in the Entity Framework)

Well, following this great Gypsy answer , where he implements a Mirror Audit , where the following method is implemented in DbSaveChanges() : //Laço de repetição em ChangeTracker.Entries. Mas o que é ele? foreach (var entidade in Chan...
asked by 21.04.2017 / 18:59