Questions tagged as 'c#'

1
answer

Generic object reference error

   System.NullReferenceException: Object reference not set to an instance of an object. This error is giving in the following code snippet: Arquivo arquivo = new Arquivo(); ArquivoVersao versao = new ArquivoVersao(); versao.XNOME = "teste"...
asked by 06.02.2015 / 19:48
3
answers

MVC 4 site publication in IIS is giving error

I uploaded my published application to IIS and I can not see it in the browser. Before I was giving Forbidden error (403) and now for Server Error (404). I've never uploaded a site in MVC to IIS. I've always known it's not the conventional way,...
asked by 03.07.2014 / 19:09
2
answers

Stored Procedure with output parameter being the Id of the last insert. W#

Hello, I'm performing an insert into a table, but I need it to return the ID you just entered. I searched the OUTPUT command but could not solve my problem. I need to do all this using procedures, ie I also need to know how to "get" this...
asked by 13.05.2014 / 21:44
1
answer

Receiving several TextBox values

I need to simultaneously edit multiple records, more specifically a list of students, and load / edit from several% s of% s linked to it. Basically I need to give them their presence. How could I proceed?     
asked by 09.05.2014 / 14:37
1
answer

Get list of checkboxes in the controller in Asp.Net

How do I get a list of checkboxes like this: <div class="editor-field" style="overflow-y: auto; height: 150px;"> <label>Especializações:</label> @{ if (ViewBag.ListProfessionalSpecialization != null) { foreach...
asked by 12.05.2014 / 19:25
1
answer

C # - Multiple keys in JOIN LINQ Lambda Expressions

I have an SQL like this: SELECT * FROM KY_AR_SOLICITACAO A JOIN KY_AR_SOLICITACAO_ITEM B ON A.NF_ENTRADA = B.NF_ENTRADA AND A.SERIE_NF_ENTRADA = B.SERIE_NF_ENTRADA AND A.NOME_CLIFOR = B.NOME_CLIFOR And in my ASP.NET MVC project, I want to m...
asked by 05.10.2018 / 13:36
1
answer

Phone and cell mask (8 or 9 digits) in the same textbox winforms

Good evening, I'm having trouble creating a mask that accepts both a cell phone number and phone number in the same textbox, I tried to use maskedinput but it did not roll .. any idea how I could do it? And in which event would it be best to pla...
asked by 24.08.2018 / 05:31
1
answer

Return from sql in text to model in the entity framework

I have the parents class and the state class: [Table("tb_pais")] public class PaisModel { [Key] [Column("id")] public int Id { get; set; } [Column("nome")] [Required(ErrorMessage = "O campo nome...
asked by 22.08.2018 / 20:19
1
answer

How to invert control list of Control.ControlCollection?

I am inserting in a Panel several Labels, as I am inserting, the first Label becomes last in the Panel. But I wanted to reverse this process. I wanted the first Label that was inserted, to be first in the Panel, and not last. private void Form...
asked by 19.08.2018 / 19:23
1
answer

Include in the Entity Framework from an Enumerable

I have the following entities: public class Rota { public Rota() { CidadesRotas = new List<CidadesRota>(); } public int RotaId { get; set; } public string Descricao { get; set; } public string Observacao {...
asked by 23.08.2018 / 21:20