Questions tagged as 'c#'

1
answer

How to pass list of checkboxes to ActionResult

I need to know how to pass the values of the inputs checkboxes to the action Edit , I need to pass the properties Checked and Id and store in a list of type Photo . Note that the controller that is running...
asked by 20.03.2014 / 20:08
2
answers

Updating treeview

I have an application that uses a treeview according to the image and code below. ASPX:<%@PageTitle="" Language="C#" MasterPageFile="~/FrontPage.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="IASD.ASCS.WebForm.register....
asked by 05.05.2014 / 18:44
3
answers

Download file excel

I created a file in excel, but now the user needs to download it, how can I do it? follow my method: public PartialViewResult ExportarParticipantes(int idPeriodo) { Regex reg = new Regex("[/ :]"); // Monta arquivo par...
asked by 12.05.2014 / 19:32
1
answer

What is the scope of the variables in a page with ASP.NET MVC?

I have a view layout : <div> <h1>Pagina Principal<h1> </div> <div> <h3>Simular<h3> </div> <div class="row"> @{Html.RenderPartial("Partials/Teste/Simular", new SimularViewModel(...
asked by 16.11.2018 / 17:35
1
answer

Create instance of classes in threads

Imagine that I have a class: Class Animal { //Propriedades } Now creating multiple instances of the class I do as follows: Animal[] animais = new Animal[10]; for(int i = 0; i < 10; i++) { animais[i] = new Animal(); } So far,...
asked by 02.12.2016 / 11:20
2
answers

Server Error in '/' Application - Runtime Error - Asp.net [closed]

My application has custom errors working correctly. Only when "/ ....." is added at the end of the URL (necessarily with more than two points), the unrecovered error "Server Error in '/' Application" appears. If I add only two points, the...
asked by 30.11.2016 / 22:08
3
answers

Deserialization of JSON

I'm having difficulty deserializing this JSON: string json = "{\"Cidade\":[\"Arrio do Sal\",\"Atl\u00e2ntida\",\"Bom Princ\u00edpio\",\"Brochier\",\"Cachoeirinha\",\"Canaos\",\"Canela\",\"Canoas\",\"Cap\u00e3o da Canoa\",\"Cidreira\",\"Distr...
asked by 16.11.2018 / 17:09
1
answer

Console in windows forms application

I have a class where you open the console, show some data and then close, when executing a second time (without closing the program), an exception occurs in Console.WriteLine("") If run once, everything works If you close and open t...
asked by 24.11.2016 / 20:31
3
answers

Where are the elements selected by LINQ stored?

I'm studying LINQ now and it hit me a question: A LINQ that runs without the methods ToList() or ToArray() returns a IEnumerable<> , right? But a IEnumerable<> is not exactly a list / array , or is it?...
asked by 21.04.2015 / 05:32
3
answers

Find what items have been marked - Help with logic

I have 4 Checkboxes, which when selected will assign their values in a variable. The result will be saved in only one field in the DB. When loading these Checkboxes, I need to make an account to know which ones were selected ... How to do this?...
asked by 15.04.2015 / 18:45