Questions tagged as 'c#'

1
answer

Error exporting a txt file

I have this code block in vs2010 with C# what it does is to create a txt file to save to a network drive. protected void export(object sender, EventArgs e) { ExportarEmbarque(); } public void ExportarEmbarque...
asked by 18.10.2017 / 19:04
1
answer

correct way to make a text box in mvc c #

I have my text box of type int in my view my leaves like this with the arrows up and down, as I declare so it does not look like this, or how I can put a dropndownlist with the years there. <div class="editor-label"> @...
asked by 24.10.2017 / 16:56
1
answer

Directives error trying to play .mp3 files in c #

Currently I want to play audio files in mp3 and I already have fragments of the code that theoretically should work. Current Code: using WMPLib; ------ Error public void timerson() { MessageBox.Show("Cada cierto tiempo segundos...
asked by 30.04.2017 / 16:58
2
answers

Casting an unknown guy and putting him in a datarow column

I have a DataTable that has been created with the same columns as another DataTable. DataTable dtAux = new DataTable(); for (int i = 0; i < dt.Columns.Count; i++) { dtAux.Columns.Add(dt.Columns[i].ToString(), dt.Columns[i].GetType());...
asked by 27.04.2017 / 11:58
2
answers

Mongo DB does not connect to C # .NET

I have a project in C # .NET in which I referenced the necessary drivers to use mongo in this language, until then, everything is correct. However, there is no type of reaction on the part of the database when I execute the following code: usi...
asked by 21.10.2017 / 14:32
2
answers

Why do I get "System resources exceeded" C # Access?

I'm working with c # and access, this is my code: foreach (var item in alumnos) { OleDbDataReader reader = Connection.Read("SELECT * FROM Estudiante WHERE cod=" + item.cod);...
asked by 09.10.2017 / 16:44
1
answer

How can I pass parameters to the method I want to start in a new thread?

Suppose I have something like that; Thread hilo = new Thread(NuevoHilo); hilo.Start(); But the method NuevoHilo has a parameter of type string. private void NuevoHilo(string item) { } How can...
asked by 01.10.2017 / 17:11
2
answers

ASP.NET execute method through AJAX

Hi, I'm learning to use AJAX in ASP NET, I want to run a method through js, but I'm not sure how to reference it, the method I want is in my controller but when I give it the route it does not tell me it does not find anything . @model P...
asked by 29.09.2017 / 21:41
1
answer

Session expires before the values set in web.config

How about Devs,     I am developing a Web forms application with asp.net, I can not make the session expire before 20 minutes, I have a login screen where when I authenticate I keep the authenticated user in a session variable, this I do so keep...
asked by 29.09.2017 / 23:28
3
answers

Use more than one constructor in a class?

Greetings. I have a class called employee. This class has the 4 basic objectives of a CRUD. I created a constructor that had the basic parameters of the table but not the primary key because it is identity and autoincrements. It happens that...
asked by 11.09.2017 / 23:14