Questions tagged as 'c#'

3
answers

Encapsulate values returned by JSON within a single object

I have a question, I have this code below in controller : [Authorize] public JsonResult Teste() { var licencas = new List<Object>(); licencas.Add(new { Responsavel = "José",...
asked by 18.03.2014 / 19:28
1
answer

Send "@ Html.BeginForm" to controller from another area. Asp.Net

I have a controller in a Area named " LoginProfessional ", with actions Index, Logon, Logoff . I make a RenderPage by calling Index in the Area root of the project, however when I click the button it...
asked by 15.05.2014 / 19:11
3
answers

WPF - DataGrid - Deletion

How can I get the index of a selected item in my DataGrid in WPF? I know that in WEB Forms I can get it like this: MainGrid.Rows[e.RowIndex].Cells[0].Text     
asked by 14.04.2014 / 20:09
1
answer

Pick up only the user name in AD

With this code, I bring everything, Domain / User. ViewBag.User = System.Security.Principal.WindowsIdentity.GetCurrent().Name; I would like to bring only the username. I can get all that, and get everything that comes after the "/" bar and...
asked by 24.09.2014 / 16:26
1
answer

Isolated Storage or SQL Server Compact

I'm making Windows Phone 8.1 something similar to a dictionary where there will be a lot of text with sorting, searching, sorting by name. Keeping in mind that there will be this large amount of information, what would be best to use Isolated...
asked by 28.08.2014 / 00:18
1
answer

How do I get the sql that linq generates for the VS2013 debug

How do I get the sql that linq generates for the VS2013 debug? How do I do this? I did it and it did not work public static List<MontaArvoreAcao> CriarListaArvoreUn(string _uf, string _cidade, string _un) { Ruptura...
asked by 02.10.2014 / 18:18
1
answer

Problem trying to connect to a Hub SignalR + Angularjs

I have a project with WebApi , SignalR and Angularjs where I do some queries and insertions in real time. Everything works fine when I start the file index.html direct when running the application, however if I try to...
asked by 05.07.2016 / 22:13
1
answer

In WinForms how do the datepicker cursor move when typing the date?

The question is about the DateTimePicker control of WinForms. When we enter the date, instead of choosing the calendar, the cursor does not scroll. That is, we enter the two digits of the day, and instead of the cursor move to the month, it cont...
asked by 06.04.2018 / 06:05
1
answer

Mask for Formatting TextBox

I was practicing programming in a WinForms project, so a question arose: How to apply a phone mask to a TextBox . So the first thing that came to mind was to use the KeyPress event of the component. The logic of the code was simple, belo...
asked by 22.08.2018 / 18:24
1
answer

Async Methods - return string from UDP

I'm developing a code whose purpose is to send a packet with a broadcast string and then read the response (if any), however I want to create a method that just returns the response string. I have the following, based on the example provided by...
asked by 17.10.2017 / 17:05