Questions tagged as 'c#'

1
answer

WinForms application stops working if the computer goes into hibernation

I have an application in winforms , which stays on the company server, then I pull the shortcut to the work area and the employee runs normally. The problem began to happen, when we switched some computers (Desktop) to notebook computer...
asked by 18.05.2018 / 20:33
1
answer

Query in several fields of the record in a single query

I'm developing an item list filter, and would like to filter by any term in the item record. I've seen this working on Angular, but I'm developing for ASP.NET MVC 5 and using the Entity Framework + Linq for queries. Has anyone ever been throu...
asked by 11.09.2015 / 15:34
1
answer

Dependency injection in the controller with Ajax

Good afternoon, I'm using ASP.NET MVC 5 with Windsor and when an Ajax request calls a method in the controller, the error saying that the controller has unmet dependencies. How do I make the request work because the dependencies are resolved in...
asked by 17.09.2015 / 22:33
4
answers

Convert String to Decimal

And I'm having trouble correctly converting this string to decimal . decimal.Parse(txtValor.Text)=meuVen.Valor; When I place the conversion in front, it shows error after = . I do not know how to convert the second part,...
asked by 13.09.2015 / 09:02
2
answers

Error NHibernate System.InvalidCastException - ManyToOneType to ComponentType

Exception:    System.InvalidCastException: Can not convert an object of type 'NHibernate.Type.ManyToOneType' to type 'NHibernate.Type.ComponentType'. The classes involved are: public class ClassePrincipal { public virtual long Codi...
asked by 16.09.2015 / 14:50
1
answer

SignalR - Messages for multiple hubs

I'm using SignalR in a C # web application with VS2015. This application has 2 pages A and B. Whoever accesses page A connects to the "pageA" hub and who accesses page B in the "pageB" hub. This way I can separate the methods (client and serv...
asked by 16.09.2015 / 00:11
1
answer

Routes ASP.NET Unconfigured

From trying so hard, I think I've misfigured something important, so I can not make the routes work. In this image it appears that the form is as post sending to the LoginProfessional controller in the Logon action. I'm not using RenderBody t...
asked by 30.04.2014 / 00:12
2
answers

Make buttons available dynamically

insert image description here I would like to know how I can insert a numeric value through a textbox, and with this value x make x y visible.    ex. if I type 3 in the textbox, button 1, 2 and 3 will be visible I'm d...
asked by 04.10.2017 / 06:15
1
answer

ASP.net MVC with WIF

When searching the web, I saw that it is not possible to register assembly's in the razor view engine in asp.net mvc as it was done in webforms. <%@ Register TagPrefix="wif" Namespace="Microsoft.IdentityModel.Web.Controls" Assembly="Microso...
asked by 24.04.2014 / 18:48
3
answers

ListBox - how to show full product name and bring another column of values

I have this ListBox . Whenloadeditusesatxtfilethus: CodetoloadListBox:privatevoidfrmOrdemServico_Load(objectsender,EventArgse){string[]d=File.ReadAllLines(@"C:\Users\willian\Downloads\dbProdutos.txt"); foreach (var line in d)...
asked by 27.10.2017 / 15:06