Questions tagged as 'c#'

1
answer

WPF - Access UserControl from a selected TabItem

I have a TabControl with several TabItems , which separated the content in UserControls to organize the code. But all of them have a common TextBox of which I want to get the value in a Button in the MainWindow . I'm new to WPF , I'm...
asked by 08.04.2018 / 20:15
1
answer

Generate table automatically with c # and mvc

how to do the following (I do not have code yet). On the page, I have a table with a Row and 5 Columns and at the end of the table a button (+) and under the table a save button. The question is when I click the (+) button, should create ano...
asked by 06.04.2018 / 14:51
1
answer

How to get value from an Html.EditorFor

I have the following command @Html.EditorFor(m => m.DataDoDesligamento) On it is placed a date, and when clicking a button it should redirect to a report, except that I need to pass to the URL the parameter Data shutdown to send to the s...
asked by 11.04.2018 / 22:23
1
answer

Input with uppercase in Asp.net

I'm creating an application in MVC with DDD and in my registration screens, I'd like the string fields like NomeCompleto , Endereço , Cidade , etc to be saved in the inputs in uppercase . I do...
asked by 20.04.2018 / 02:21
1
answer

Linq to Objects - Performance

When looking for good practice content when doing LINQ I came across the following filter situation: // Filtros int idBairro = 8626; 1st way: IQueryable<TesteConsulta> queryCidade = (from c in db.ERPCEPCidade...
asked by 04.04.2018 / 20:32
1
answer

Command similar to sql convert in C #

I have a return in sql that comes as something like 52,451541554 . This return, if I convert it with the command convert(datetime, DtCriacao, 103) of sql it turns into a date format, but I need to get it myself, which this time...
asked by 04.04.2018 / 13:40
1
answer

Task continuous execution even after exception

The method StaticReports.AreaData that is within the Task below is returning an exception already handled in the method itself, the problem is that the Task continues execution of the next line var links = ListLists.ListLinksDownlaod (driver)...
asked by 05.04.2018 / 17:45
1
answer

How to hide all buttons with foreach?

Follow the code below: FindViewById<Button>(Resource.Id.Button_1).Visibility = ViewStates.Gone; The code above is to hide a "button 1" and I have more than 50 buttons. I do not want to copy all this line and do up to 50 times, it's ve...
asked by 25.03.2018 / 05:13
1
answer

Unable to read data from the transport connection: Connection reset by peer

Follow the code: here . The client code is getting an exception:    Unable to read data from connection: Connection reset by   peer. Why this error? And how can I fix it?     
asked by 26.03.2018 / 16:34
1
answer

Syntax .cshtml - DevExpress

In the .aspx page, I have an ASPxRichEdit and the top of the code I place: <%@ Register Assembly="DevExpress.Web.ASPxRichEdit.v17.2, Version=17.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxRichE...
asked by 26.03.2018 / 15:32