Questions tagged as 'c#'

1
answer

Repeat the same structure XAML several times

I have this structure ... <StackPanel> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="4*"/> <ColumnDefinition Width="*...
asked by 23.12.2017 / 11:36
1
answer

How to make a list of an object and save it in a txt, separated by tabs and jump the line in the last field

$ using System; //Se incluya la libreria de entrada / salida //Para poder utilizar las clases de lectura / escritura using System.IO; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using obje...
asked by 26.12.2017 / 20:25
0
answers

Unable to create an instance of a user control in WPF

I am having problems (and instability) with the graphic interface in WPF, trying to incorporate controls gives me an error of "Object reference not established as an instance of an object". The call to the namespace is located at the beginning o...
asked by 20.12.2017 / 17:32
1
answer

Error in oleConn.Open ();

Guys I have a problem, I drop the program on the first line that I put here in the code, it says:    Error not expected from the external database controller (1). foreach (DataRow dr1 in dtHorarios.Rows) { horarios = horarios + dr1["VA...
asked by 19.12.2017 / 17:55
1
answer

Receive a WIN32 message in a C # class

What I'm trying to do is send a WIN32 message using [DllImport("user32")] public static extern bool PostMessage(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam); and receive it in my static Program class, where I have the main() m...
asked by 02.01.2018 / 18:21
0
answers

The javascript code does not send to the controller

I am doing a web application in C # ASP.NET MVC5, I need in the view to validate a dropdownlist that is not empty, and when it is full send the data to the controller. JavaScript function Validar() { var pais_id = document.getElementB...
asked by 18.12.2017 / 20:20
2
answers

Error The ObjectContext instance asp.net

Could you help me with this error asp.net The ObjectContext instance has been disposed and can no longer be used for operations that require a connection. this is my code controller public ActionResult GetData() {...
asked by 11.12.2017 / 22:18
1
answer

AutoMapper does not convert empty lists well

There is a problem with the AutoMapper, when mapping an empty list, it is entrusted to a list with Count = 0, regardless of whether the configuration is specified that the values are not taken into account = null link code: using Syste...
asked by 15.12.2017 / 11:08
1
answer

using selectedValue from DropDownList

Working with ASP.NET Core 1.1 Visual Studio 2017 - EntityFramework 1.0.0, Microsoft .Net Framework 4.7.02046, SQL Server 2012 LocalDB C # I am making my first experience with these tools. I follow the example ContosoUniversity developed in the...
asked by 12.12.2017 / 22:08
2
answers

Fill datagridview with condition # Sql

Good friends. I am creating a project and I just ran into something that I can not solve. I have a datagridview where I show all the information of an employee: private void Mostrar(){ var query = from p in db.Usuarios_...
asked by 08.12.2017 / 05:46