Questions tagged as 'c#'

1
answer

Printing with ReportViewer Asp.Net

Good afternoon, I'd like some help. I am generating an impression by ReportViewer with Visual Studio 2010, the report is generated correctly but in the print preview the Print button in the report does not appear. So I decided to convert the...
asked by 29.01.2016 / 12:17
1
answer

Ajax - Protect WebServices

I'm building an ASP.NET MVC application and I make lots of calls to actions and webservices via ajax (jquery or angularjs). How could I hide these calls, or make sure they are only made by my application? For example: $('#btnNext').clic...
asked by 22.01.2016 / 13:59
1
answer

Update multiple records with EntityFramework

Assuming I have the following query: UPDATE tb_foo SET idoso = 1 WHERE idade > 65 To perform this same process in linq, I have IEnumerable<Foo> foos = contexto.Foos.Where(e => e.Idade > 65); foreach(var item in foos) {...
asked by 05.01.2016 / 20:33
1
answer

DropDownListFor in a for

I am trying to fill a DropDownList with a selected value within a for , but it is not working properly. What happens is that when Action Index returns the model to View , values are not being selected, always being the...
asked by 29.12.2015 / 14:44
2
answers

Drive with TouchScrren 2D

I need to make a C # Script code for moving a 2d character on Unity. I developed a code that runs well on the pc using the arrows, but I have no idea how to move it using touchScren from an Android phone. Here's what I've done: using Uni...
asked by 12.02.2016 / 06:33
1
answer

SubQuery with Linq

I need to query Linq for an object called Client. This object has a relationship with another object, which is a List of phones. For each of the phones, there is a type: 'Casa', 'Comercial', 'Recado' , etc. I want to bring everything in...
asked by 15.02.2016 / 18:45
1
answer

When are threads (Thread Pool) initialized? - W#

I have the following code: public void mainFunc() { for (int i = 0; i < 10; i++) { ThreadPool.QueueUserWorkItem(new WaitCallback(funcThread), pto); } Thread.Sleep(2000) // Thread de teste. // Fazer algo quando...
asked by 09.02.2016 / 20:11
1
answer

DateTimePicker with custom dates

I'm developing a query marking system in Windows Forms and I had the idea of including a DateTimePicker where only the dates with available places should be "clickable" by the user. Is there a way to do this?     
asked by 16.01.2017 / 00:17
1
answer

Application does not open in windows XP because it does not have administrator permission

I'm having a problem, my program's executable does not run on windows XP because of user permission issues. Onothersystems,youputittorunasanadministratoranditworksnormally.SearchingtheinternetIfoundseveralsuggestionslikethis: C #: Force an a...
asked by 19.01.2017 / 15:16
1
answer

Alphabetical sort in ListView equal to App People

I've been researching how to make a list equal to the contact list of the People App of Windows 10 and found a good example . However, the example does not implement the alphabetic ordering that exists in the People app (image below)....
asked by 14.01.2017 / 19:44