Questions tagged as 'c#'

1
answer

c # deserialize xml within a class

Hello, I have the following query. I have an Origin class, which has the following structure public class Origen { public int IdOrigen { get; set; } public string Nombre { get; set; } public decimal Peso { get; set; } publi...
asked by 17.11.2017 / 20:46
2
answers

Keep value of a timer in form change

In my application I have a Timer that counts down from X seconds When the startup works without problems, the error comes when the form changes to the label where the remaining time loses its value. I'm using inheritance of forms, the...
asked by 05.12.2017 / 09:35
1
answer

Differences between timeout variables

I'm working with a web application that performs a Session.Timeout = 30 in code, and it is this part that confuses me, since in the web.config the following configurations are available: <authentication mode="Forms"> <...
asked by 04.12.2017 / 19:33
1
answer

How do I manipulate control (Label, Text, Button etc) in C #?

I have a code where according to the result string of numbers I assign to the Label / Label a corresponding color, but I would like to reduce that code: to a reduced code (understanding the second line is not correct):     
asked by 04.12.2017 / 18:59
1
answer

How do I get the path or main route of the project in c #?

How to get the path of a project in c #. Application.StartupPath does not give me the indicated route string ruta = Path.Combine(Application.StartupPath, @"json\SemanticaColores.json"); I really need to make references to...
asked by 04.12.2017 / 19:55
1
answer

upload file to server and save path in BD with .NET

I have a web form within which one of its fields the function is to upload a file to the server (I already have a folder where the files are stored) and the path to save it in a BD. How can I do so that with just the button to send the form you...
asked by 22.11.2017 / 02:50
2
answers

Pass values from a DataGridView to ComboBox and TextBox

I have the following conflict, when trying to pass the values of each row of my datagrid to the other contours of my form since it only loads the values of the first row and I require that according to the row on which the user clicks. load the...
asked by 26.01.2018 / 00:37
1
answer

Error sending file by AJAX

I am trying to save a file in a database of SQL SERVER 2008 and I am not managing to send the data to the server side or I am not receiving it well not what I know. Here is my code: Front-End @model PCotiza_compras.Models...
asked by 10.11.2017 / 17:53
3
answers

When entering the temperature value, I must determine the type of climate

When entering the temperature value, I must determine the type of climate. must be done with Windows forms.    Temperature 10 and = 21 and 30 = Tropical This is the code I have: private void btnAceptar_Click(object sender, EventArgs...
asked by 11.11.2017 / 17:50
2
answers

How to block the focus of a control from advancing to the next control in wpf

I am developing a small application in wpf and a simple validation, what I want is that when the control does not satisfy the validation, the focus of the control is not removed even though the user clicks on another control. I forced that it do...
asked by 11.11.2017 / 18:55