Questions tagged as 'c#'

2
answers

CORS header 'Access-Control-Allow-Origin' missing in aspx

I have an application that uses a Java script function and sends a call to consume a web service. Everything works fine but I do not get anything in the browser. When I see the console, a message appears CORS header 'Access-Control-Allo...
asked by 04.05.2016 / 20:46
0
answers

WPF - Use ItemsControl within ItemsControl

I'm having a somewhat strange problem. To begin with I have these two classes: public class Server { public Guid id { get; set; } public string descripcion { get; set; } public string nombre { get; set; } public List<PathSyn...
asked by 31.01.2018 / 09:46
2
answers

DateTime - 1 week

I have the following variable: DateTime zonaSemana = DateTime.Today.AddDays(((int)DayOfWeek.Wednesday - (int)DateTime.Today.DayOfWeek) == 0 ? 7 : ((int)DayOfWeek.Wednesday - (int)DateTime.Today.DayOfWeek + 7) % 7).AddSeconds(1); Is there...
asked by 31.08.2018 / 12:05
4
answers

How to replace the session in web asp.net c #?

Let's see, I'll explain in more detail what happened. I have a texbox and a button; what I want is to enter data to the texbox and when I click on the button I redirect to another page getting the value of that texbox. For that I am session to s...
asked by 02.05.2018 / 19:55
3
answers

Variable in literal string C #

Having this code: ' string s ="insert into Administrador values('"+admin.nick+"','"+admin.pass+"','"+admin.nombre+"');";' There would be some way to do something like: string s = @"insert into Administador values('admin.nick','admin.pass'...
asked by 09.05.2017 / 13:04
1
answer

WCF security with Certificates

Good I am trying to connect a WCF service with security through certificates, in the development environment it works correctly, in a simulated environment with 2 teams, one as a service and another as a client, or in the same team (service and...
asked by 16.11.2016 / 23:34
2
answers

For what is "=" in C #

My question is so that the characters are used = > in C #, I've seen it in a method to access the device's light sensor. This is the method private void _lightSensor_ReadingChanged(LightSensor sender, LightSensorReadingChangedEventArgs args...
asked by 06.02.2016 / 00:06
1
answer

Binding the Value of a ComboBox

My problem is that I am trying to bind between a ComboBox and a property type string in viewModel, but I can not do it <ComboBox HorizontalAlignment="Stretch" SelectedItem="{Binding Path=OResultado, Mode=TwoWay}">...
asked by 14.01.2016 / 01:39
2
answers

How to parse correctly in C #

Searching for parse, I found the following: Int32.Parse(string); Convert.ToInt32(string); My query is as follows: What is the best way to parse, which is more effective and why. In which case a form is occupied, and in which case another...
asked by 12.04.2017 / 19:56
1
answer

c # WCF Error in response of Webservice when consuming with SOAP MTOM of Electronic Billing

I am consuming a Web Service to send a file https://facturaelectronica.dian.gov.co/habilitacion/B2BIntegrationEngine/FacturaElectronica/facturaElectronica.wsdl But in the debug it returns the following exception:    System.ServiceModel.S...
asked by 07.09.2018 / 15:21