Questions tagged as 'c#'

4
answers

Change page without changing user's URL

How to change pages internally without changing the URL to the user? Without using frames. Example: The user entered my site: http://exemplo.com and clicked the menu and went to the "Contact" page. Make the URL continue: http:/...
asked by 02.07.2014 / 21:10
1
answer

What tools are available for .NET code coverage in Visual Studio?

I have developed systems using TDD in .NET. Recently, the company that worked, bought the version of Visual Studio 2013 Pro and in this version we do not have the code coverage tool, only from the Premium version (visual studio compare versions...
asked by 25.10.2014 / 19:47
2
answers

File upload does not work on Locaweb hosting

Locally I can upload and quietly save a file using the following code Controller: public ActionResult CriarProduto(FormCollection form, HttpPostedFileBase file) { Produto produto = new Produto(); ProdutoService prod = new ProdutoServi...
asked by 01.08.2014 / 19:51
1
answer

Conversion error in a linq query

I made this query and Where is giving this error: Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<AnonymousType#1>' to 'System.Collections.Generic.List<AnonymousType#1>' Missed this part string _cnpj = c...
asked by 26.06.2014 / 22:11
3
answers

Entity FrameWork relationship many x many extra field

Good morning, I am studying the FrameWork Entity Code First and am wondering how I should create a NxN template with extra information in the relationship table. For example: Let's assume the following relationship (image taken from the MS...
asked by 10.09.2014 / 15:48
1
answer

LINQ Lambda | Query Syntax VS Method Syntax Performance [duplicate]

Doubt regarding construction and performance of querys using Query Syntax and Method Syntax / LINQ Query Syntax: var VendorQuery = from v in vendors where v.CompanyName.Contains("Toy")...
asked by 27.12.2018 / 10:58
2
answers

Compare date time with a timespan

In asp mvc 4, I'm doing a query where I'll get the data where hours are less than or equal to those entered by the user. That is, I have a dateTime and I check with the variable entered by the user (a TimeSpan ) if it is lowe...
asked by 18.03.2014 / 16:11
1
answer

How to edit data (numbers only) and calculate its values in a DataGrid?

I need a DataGrid column to receive users only numbers in the rows (cells) and after clicking on the button, multiplication calculations are performed between cells on the same row and different columns. The DataGrid is populated as follows to t...
asked by 27.05.2016 / 01:31
2
answers

How to create a View for this Model case?

I've been trying to work around this issue (#) into a problem I'm having but I'm not getting a positive result. I'm getting an array with on's variants instead of getting an array with id's , as I imagined it to be. I have the following...
asked by 23.03.2014 / 16:22
2
answers

Insert image into SQL SERVER2008 database using image path

I'm starting in C # and I'm having trouble inserting into a picturebox an image as in the image below: The above screen is a photo record, and the browse image button works, but I do not know how to capture the path of the image to writ...
asked by 13.12.2014 / 19:26