Questions tagged as 'c#'

1
answer

How to create a chart in ASP.Net

I'm trying to create a chart with my network usage history in my company. I've never created a chart before in Asp.Net, so I really do not know how to get started, and the examples I found on the internet using Microsoft Chart Control were not e...
asked by 26.03.2016 / 13:23
1
answer

The ConnectionString property was not initialized

I'm trying to create a category registry, in the registry everything went fine, but when I go to make the location of the records added to the registry always returns the same error:   An unhandled exception of type 'System.InvalidOperationEx...
asked by 09.03.2017 / 14:26
1
answer

Uploading images in asp net core 1.0

I'm new to .NET, I learned in a course in asp net mvc 5 so I would need to take that upload code and transform it to asp net core if I can help. I'm grateful. [HttpPost] [ValidateAntiForgeryToken] public ActionResult Create([Bind(Inclu...
asked by 04.03.2017 / 02:25
1
answer

Error registering data in ViewModel

I have this question where I where according to the answers, my logic ... Only now, when registering the data, an error was generated. This error refers to the property of a view that can not be null, which is the ID. That is, from what I unde...
asked by 28.05.2016 / 23:00
1
answer

Access controller of another project in the same solution

Personal I have 3 projects in the same solution: KnockDocWeb, KanoDockModels and KnodockApi as shown below: When I compile the project it starts KanoDockWeb, however I want to access a controller that is in KanoDocApi by KanoDockWeb....
asked by 28.05.2016 / 18:45
1
answer

Entity framework many-to-many IEntityChangeTracker error. How to solve?

I have a many-to-many relationship and my tables are correct about the relationship in the database. The problem is that my insert works perfectly when you do not use an existing entity in the database, but when I search the database and add it...
asked by 26.02.2016 / 03:57
2
answers

"Object reference not set to an instance of an object." error when displaying a null value in view

Within C # MVC5, I'm creating a user registration form with multiple fields. One of them is the (Gratified) Role field, which the user may or may not have. The following is the class User: public class Usuarios { public int Id { get; s...
asked by 19.02.2016 / 19:37
2
answers

Loading Grid data with CheckBoxColumn

I'm creating a form to register a license for a product. This form serves to record which solution a client has. In the form to add a product you only have to select product and customer . I'm having a hard time crafting the loading...
asked by 10.03.2016 / 13:02
1
answer

ASP.NET MVC Post Date Format

I have a form that sends via post the search parameters, however the parameter of type date whenever it arrives in the action the month and day are inverted, for example, if I put in the page the date 04/03/2016 in the control arrives 03/04/2016...
asked by 10.03.2016 / 16:04
1
answer

Problem with Dates in ASP.NET MVC

In my model I have the following field: [Column("sdt_DataReferencia")] [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy-MM-dd}")] [Display(Name = "Data Referência")] [DataType(DataType.Date)] public DateTime DataRefer...
asked by 07.03.2016 / 18:55