Questions tagged as 'c#'

1
answer

Onchange function does not work

Good afternoon, I have a function that verifies if the typed email exists in the database, and if the email is valid. Here is the function: <script type = "text/javascript" > function validateEmail(emailField) { var reg = /^(...
asked by 12.12.2017 / 14:53
1
answer

Problem saving

Only one form that is returning this error, the question I do not know what can be or how to do it, some ask to put the relationship in cascade what is already.   NHibernate.TransientObjectException: object references an unsaved transient ins...
asked by 28.02.2018 / 18:55
2
answers

How to load a list of numbers in a TXT file to a list in C #?

I have the following list of numbers loaded from a table, and it is separated by the character "|": 40 |16000|20|311258|3 40 |17000|20|857392|5 50 |18000|90|528777|1 60 |19000|20|917336|3 60 |20000|20|850348|3 60 |21000|90|72598 |4 100|36000|2...
asked by 28.02.2018 / 13:22
1
answer

WebClient.DownloadFile (Address, FileName) Doubt using variable

Well, I'm creating an update system, and it's giving error on one part WebClient web = new WebClient(); string DownloadVersion = web.DownloadString("https://drive.google.com/uc?authuser=0&id=1bpVdsyUj3oOn1gLbcVRE7uZjIczI5Yc_&export=dow...
asked by 10.12.2017 / 22:15
1
answer

Project Standards: Singleton

I know that Singleton guarantees me a single instance of a given object. I got this. What creates me doubt would be its use in practice like that. Let's assume the code below, using Singleton with Generics (code taken from t...
asked by 08.12.2017 / 10:23
1
answer

How to enable / disable a txt from a choice of a jquery radiobutton?

I need to enable / disable a field according to the choice in a radiobutton Validations This field should only be active when the "Inactive" radio button is selected Here is the code: RadioButton: <asp:Label ID="Label40"...
asked by 09.01.2018 / 14:41
1
answer

How to change the color of the icon inside a Rectangle - WPF

I need to change the color of the button icon to "White", but I do not know how to do it. I'm using a Mahapss Icon Pack ... I've already seen doing this on the net using the ContentControl from GRID, but being inside a rectangle, I have no idea...
asked by 04.01.2018 / 14:02
1
answer

How to read data from a class

I have an api that when receiving the data fills a class, I want to do a while in this class tb_dados_api and tb_carrinho, get the data to write to the database, how could I do this? Thank you Here I am getting the data [HttpPost]...
asked by 08.12.2017 / 02:20
1
answer

Lock typing TextBox field with CalendarExtender

Good afternoon, I need to block typing the date in an asp.net TextBox field. It can only receive the date selected in the calenderExtender component applied to the TextBox. Would anyone have some way via front end to block typing?     
asked by 23.01.2018 / 20:11
2
answers

No syntax error?

Error: (only assignment call increment decrement and new object expressions can be used as a statement) I do not understand why you are giving this error, since the variable is of type int ... int deQuantidade = 0, ateQuantidade = 0; string...
asked by 26.01.2018 / 02:34