Questions tagged as 'asp.net-mvc'

1
answer

Can not implicitly convert type list to an object

Good evening, I'm doubtful of the following error:    Can not implicitly convert type   'System.Collections.Generic.List'   to   'ITCore.FlowCredit.Business.Entities.ProductAmortizacaoCreditoDiasSearch' The Code: private void LoadDia...
asked by 07.02.2017 / 23:42
1
answer

Bring only certain amounts of information from the MVC database [closed]

I need to bring only 6 records of the database to display in View, instead of just 6 records, it's all coming up. The code is as follows: public PartialViewResult Cursos() { ViewBag.Cursos = new CursoRepositorio().BuscarTodos().Take(6)....
asked by 03.03.2017 / 15:53
1
answer

Send form parameter to the controller via ajax

I have an Index with a form, I need to fill out this form and when I click the Filter button, call the controller using ajax. Index.cshtml @using (Html.BeginForm("ResultadoPesquisa", "RelatorioDesempenhoData", FormMethod.Post)) { @Ht...
asked by 03.03.2017 / 19:05
1
answer

Display an image in mvc

Hello, I'd like some help. I have the following controller to register an image and some fields, with the property of the image being string : [HttpPost] [ValidateInput(false)] [ValidateAntiForgeryToken]...
asked by 24.02.2017 / 19:02
2
answers

Problems saving a selected item in Dropdownlistfor using a ViewModel

I'm trying to save a change I try to make by selecting a Category in a Dropdownlistfor . Type like this: I'mfollowingtheDebugandtheViewissendingtheselectedCategory,butIcannotcontinuethischange.MySubcategoryControllerlookslikethis://G...
asked by 22.02.2017 / 17:37
2
answers

Driver code runs but nothing happens

After much research without results I come here to question you. The project is in MVC 5 using C# . This is the code that calls an MVC controller $('#btnPesquisa').click(function () { var textAPesquisar = $("#txtTermoDePesq...
asked by 05.01.2017 / 12:24
1
answer

Running a Background Method Asp.Net/C# (Async or Thread)

What I needed to do was the following Call a Post method that is called Cadastrar Before this method finish I would call a new method called PessoaNotificacao However, the Register method would not wait for PessoaNotifi...
asked by 06.01.2017 / 17:35
1
answer

Overwrite Bootstrap classes with CSS file

I'm having a hard time overriding some Bootstrap classes using a CSS file I created. I'm using the Bundle to make these changes: public static void RegisterBundles(BundleCollection bundles, bool premium =true) { #region Default Web Site...
asked by 04.01.2017 / 17:18
2
answers

ICollectionobject - how to create and use objects within the collection

I'm working on a project using MVC5 and EntityFramwork 6. I followed a tutorial to create a database from my templates. Example of a template: public class Side { public Side() { } public int ID { get; set; } public I...
asked by 13.12.2016 / 18:00
2
answers

Image swapping problem using Javascript

The idea is to change image, after update. I have the following code: <div id="context1" data-toggle="context" data-target="#context-menu1"> <img id="SizeImage1" src="@Url.Action("StreamImage1", "Account", new { id = Model.Id }...
asked by 23.11.2016 / 17:37