Questions tagged as '.net'

4
answers

How to hide the time of a "DateTime?" field in the user interface?

The time is showing up for the user. My question: is it possible to hide the time and show only the date? How are you looking: Modelcode: View code:     
asked by 05.02.2014 / 18:32
3
answers

HTML Helpers in ASP.NET MVC 4

I have seen some HTML Helpers like this: @Html.LabelFor(x => x) and @Html.LabelFor(model => model.Propriedade) , however, I do not understand this parameter that I should pass, x => x , what is this?     
asked by 08.11.2014 / 13:42
1
answer

How to do a foreach loop with limit in C #?

How can I do a foreach loop with boundary, for example I have a dictionary with 100 items and I want to loop item 20 up to 50 how can I do this in C #.     
asked by 18.06.2016 / 06:23
2
answers

Using interfaces for domain classes

Is it a good practice to make use of interfaces for domain class? Do I have an advantage doing this? If so, which one? Example: public interface IAuditoria { long AuditoriaID { get; set; } string Descricao { get; set; } string S...
asked by 25.07.2018 / 19:14
2
answers

How to read the width and height of a physical image-type file?

How to get width and height of a physical image file?     
asked by 21.01.2015 / 15:01
2
answers

Foreach Duplicating Data

I have 2 foreachs , to do a date search in ViewBags , where I return both in a select. But for each item in the first foreach, it makes a full loop in the second, thus doubling the values, by each item in the first. Ex: If I ha...
asked by 02.02.2015 / 12:56
2
answers

Windows forms start with operating system

How do I get the user to choose whether the system (system tray c #) will start with the OS or not through the installation in WizardSetup (Visual Studio 2010)?     
asked by 06.09.2014 / 22:45
2
answers

Get the number of decimal places of a decimal

How can I get the number of decimal places of a decimal variable? Eg: If I receive the number:    4.5 - should return 1   5.65 - should return 2   6.997 - should return 3 I know you can do this by converting to string...
asked by 05.10.2015 / 19:49
2
answers

Is it possible to take advantage of the same WPF view for Desktop and Web?

Dear, I've never programmed with WPF but I will soon have the opportunity and already thinking about the future, which is now, where desktop applications are / are being migrated to the web and, also thinking about those who are still reluctant...
asked by 17.03.2014 / 13:30
2
answers

Creating Custom Annotations in ASP.NET

I have Controller in my project asp.net (Web Service) I need to do a token check to request each method. One solution I found is to create a static method and place a call at the beginning of each method. I could only put it once in the...
asked by 14.03.2014 / 13:45