Questions tagged as 'c#'

1
answer

Write length in StreamWriter

Good morning. I am trying through WebRequest to send a json using the PUT method. When I get to httpWebRequest.GetResponse () I get an error.    You must write ContentLength bytes in the request flow before calling [Begin] GetResponse. Wr...
asked by 21.09.2016 / 09:00
2
answers

How to send a value of an input that is assigned by jquery to the controller using Url.Action in MVC C #

I assign a value to input by jquery in document ready $(document).ready(function () { $("#input_1").val(“valor de prueba”); }); In the body, there is the input and attempt to send its value by url.acti...
asked by 15.09.2016 / 21:27
2
answers

Save id of an image clicked on asp.net (Web Forms)

Excuse me, can anyone help me with the following? Language: ASP Web Forms, c # not PHP.  How could you save the id of an image when you click it? ... I want to make a page for a library, when I click on the image of the book, redirect me to a...
asked by 09.09.2016 / 10:21
1
answer

How to apply inheritance in the Entity Framework

I am working on a Windows Forms desktop app, I use Visual Studio 2015, Entity Framework approach code-firts. The subject is the following: I have some tables such as: Purchases, Sales, TypeOperations and Movements. In TipoOperacoines regis...
asked by 24.08.2016 / 22:30
1
answer

Call an ActionResult from Jquery

From Jquery I want to call an ActionResult from a controller, but it does not arrive. That ActionResult does not belong to any view, I just want to change a data in BBDD. How could I get it? The error that the javascript console leaves:   ...
asked by 08.09.2016 / 10:11
2
answers

EntityFramework error or does not save changes

I am having problems saving an entity in my EF6 context, I have tried it in several ways and in 1 it does not give an error but it does not save, the other gives an error. var RegistroProducto = new tblProductos() { Estado...
asked by 24.08.2016 / 21:46
1
answer

Send form input to Controller with angularjs

I need to send the form's input collection to the MVC controller method (C #) by means of an ajax request from an Angular controller, the problem is that the FormCollection arrives empty to the controller. p> How can I send the serialized f...
asked by 25.08.2016 / 13:10
2
answers

Problem when inserting data in windows form c # form with sql

I am developing a program that I am doing for my class, it is a small program of a hardware store where product information is kept, clients (so that if it is a distributor, apply discount) , types of products and so on. The problem is in th...
asked by 26.08.2016 / 03:20
1
answer

When using (String.Format ("{0: # - # - ##}", item.codigo)) on an item in a list, the order by value_id is lost MVC C #

I have the following view that is responsible for showing the code in this format 9-9-99. And from the controller I indicate that it is ordered by the code, which is stored in full: <table id="listado_table " class="table table-striped tabl...
asked by 27.08.2016 / 15:45
1
answer

How can I position items within Google Map using longitut and latitude

On my Asp.Net C # page I show a google map and in a list I have several addresses (longitude, latitude) and I want my map to appear with a reference to each of them ... How can I do it? / p> foreach (var item in lista) { double? latitu...
asked by 02.09.2016 / 15:26