Questions tagged as 'asp.net-mvc'

1
answer

Excel file reading with more than 1 worksheet in the same file using C #

In this code I can read all data from the Plan1 worksheet that has the name "Data" from the ".xls" file, but if I have more worksheet in the same file, how can I read it? Coderead:staticList<Entidade>ObterDadosExcel(stringcaminhoArquivo...
asked by 28.08.2018 / 04:11
1
answer

Mounting an HTML table from another records with JQuery and C #?

I need to compose / generate a new table in html where the new records will come from a selection of <input type checkbox> in another table in the same html page displayed in a modal, see image. Once the user clicks on import, you...
asked by 08.07.2016 / 19:48
3
answers

Send All CheckBox via Post

I'm trying to send all the CheckBox from my View, however, I can only send the ones that are selected via FormCollection Controller public ActionResult Index() { List<ListaCheckBox> listacheck = new List<ListaCheckBox>();...
asked by 29.04.2016 / 17:47
1
answer

Show data from multiple models in the view

I have the following problem: In a view I will show data from 8 different tables and I have the following code that I put together to take the data to the view. public ActionResult Index() { var avisos = (from av in neEAD.mot_avis...
asked by 17.05.2016 / 21:35
1
answer

Lambda - how to use the || (OR) in an .Any ()

What would be the correct way to implement the line below in Lambda ? ListaDeRespostasPossiveis.Any(x => x.Nome == "respostaUm" || x.Nome == "respostaDois") I saw some examples in Stack Overflow in English, but I did not find it for the...
asked by 18.05.2017 / 01:33
1
answer

Validate for js with for each

In this screen I need to do a validation so that in each record, when the registry is allowed, in case it is marked, bring me the registry that is marked every time I edit (check or uncheck the checkbox). In the case the best way I foun...
asked by 26.11.2015 / 15:29
2
answers

Html.EditorFor default value

How could I put Default value in a Html.EditorFor ? Understanding my code, I have a field that is a filter when I click on EditorFor opens the calendar, I would like the datetime.now to appear but only visual without do...
asked by 23.11.2015 / 15:35
1
answer

How to calculate Total via JavaScript

To show the items in a sale I use a Json to display the data using this script. <script> $(document).ready(function () { var CodigoVenda = @ViewBag.CodigoVenda; $.ajax({ type: "GET", url: "/Venda/GetDadosIte...
asked by 30.11.2015 / 21:04
1
answer

Source not recognized in PDF generation

I'm using the ITextSharp library to create PDF's and I'm having problems with the source of the document, I have the error "Font is an ambiguous", I've looked in several places and all the examples end up giving the same error, fix this or do yo...
asked by 11.06.2016 / 20:47
2
answers

Scaffold Template Edition MVC. How to get project reference in Solution Folder?

I'm editing the ASP.NET MVC Scaffold T4 templates and I need to get some extra class information. For example, , of the DisplayName class attribute. I found some examples: var env = (DTE)((IServiceProvider)this.Host).GetService(typeof(E...
asked by 04.09.2015 / 16:22