Questions tagged as 'asp.net-mvc'

1
answer

Edit screen does not load the data on the screen

When entering edit mode, the edit should be filled in and only the city dropdownlist comes. See me cshtml below. @model TreinamentoCrud.FuncViewModel.FuncionarioViewModel @{ ViewBag.Title = "EditVM"; } <h2>EditVM</h2> @usin...
asked by 13.08.2018 / 15:51
1
answer

Viewbag, passing controller value to page razor

I have this Ajax to be able to get the data and move to the function Save items that is in the schedulesItemsController, which works perfectly. function SalvarItens() { var idItem = $("#idItem").val(); if (idItem == 0) { var dataInicio =...
asked by 01.06.2018 / 15:50
1
answer

Pass value from a view to modal

Starting my studies in MVC I am doing a CD registration. It turns out I have a view with artist details (Artists / Details / 1). In this View, I have a "New" button to type a new artist CD and it opens a modal window for it (Jobs / Create). You...
asked by 24.04.2018 / 14:19
1
answer

Strange error on line XLWorkbook

Follow the code: protected void importar_Click(object sender, EventArgs e) { if (selecionarArquivo.HasFile) { if (Path.GetExtension(selecionarArquivo.FileName) != ".xlsx" && Path.GetExtension(selecionarArquivo.Fi...
asked by 28.02.2018 / 13:04
1
answer

Return two models in a view (foreach)

Good morning. I'm new to C # and aspnet and I came across a problem. Developing a virtual calendar, I would like to display two queries on a page just when the user logs in, however, there in my controller I can only return a view even though I...
asked by 23.12.2017 / 13:12
1
answer

How to perform a Left Join with LINQ C # using my SQL?

Example that works in SQL: select * from Doacoes inner join Projetos on Projetos.IdProjeto = Doacoes.IdProjeto left join Pedidos on Doacoes.IdDoacao = Pedidos.IdDoacao left join Recompensas on Pedidos.IdRecompensa = Recompensas.IdRecompensa...
asked by 07.12.2017 / 12:39
1
answer

APS.NET MVC - DB data split

I need to do a function in VB which allows you to list the data of a field in the database in a DropDown. Ihavetolistdatafromthe'EixoX'field(fromthefigureabove)inDropDown.Thequestionis:IneedtolistDBdatafromagivenID,forexampleID=1,whereIhavet...
asked by 30.07.2018 / 12:54
1
answer

Modal passing data nullo

When writing in my modal the Controller receives Null. 1 - Modal Model @model WebAutenticado.Models.CAD_DEVP @{ Layout = "~/Views/Shared/_LayoutModal.cshtml"; } @using (Html.BeginForm()) { @Html.AntiForgeryToken()...
asked by 14.08.2017 / 01:16
1
answer

Select a particular view for viewing - ASP. NET MVC

I'm learning ASP.NET MVC and I came across a situation that would like the help of you. I have a view that shows the result of a database query on the screen. Each record shown has an ID (ID), and I need to click change to hit something that...
asked by 25.07.2017 / 15:58
1
answer

Attribute type varbinary sql server with C #

This DocumentoPDF column so far was not used by the system: HomeIamnotsurewhattodowiththis:Thisistheerrormessage:"já existe um DataReader aberto associado a este command que deve ser fechado primeiro" The error already occurs...
asked by 07.06.2017 / 03:57