Questions tagged as 'c#'

2
answers

How to standardize DateTime format for all type fields without using DisplayFor or EditorFor in MVC?

In many cases in the application we have to use something like: @Html.Raw(item.data.ToString("dd/MM/yyyy")) can not be DisplayFor nor EditorFor in any case and we have to show the Brazilian date format. How to standardize this...
asked by 15.09.2016 / 20:50
2
answers

What are the differences between Visibility.Hidden and Visibility.Collapsed?

What are the differences between WPF visibility% wp% and wpf%? There are practical or theoretical differences between set the Visibility.Hidden and Visibility.Collapsed of a control for zero and set its visibility to H...
asked by 10.09.2016 / 03:41
2
answers

Convert string to integer

I'm not able to convert the text from my TextBox to integer. namespace Pag98_Exe1 { public partial class frmveiculos : Form { public frmveiculos() { InitializeComponent(); } Veiculos...
asked by 21.10.2016 / 02:44
2
answers

Web pagination with C #

I'm building an administrative application, and in this application I have a messaging page. I'm currently bringing the last 20 messages. I already have the screen ready to receive this messages, but my problem is in making the button logic t...
asked by 25.08.2016 / 16:34
2
answers

What is the name of these parameters in ASP.NET MVC?

What is the name of these parameters in brackets used to restrict some access or define the protocol used, as in the example: [Authorize] and [HttpPost] . Is it possible to create a custom "filter"? for example, to allow access t...
asked by 29.02.2016 / 22:50
2
answers

Entity - Disable Lazy Loading?

I'm at the beginning of project development. This project will have a large database. Is it advisable to keep lazy load enabled? I'm worried about losing performance.     
asked by 21.01.2016 / 18:34
3
answers

How to implement custom functionality in a model in .NET?

I needed to implement some functionality in the users model but as you can see right at the beginning this class is automatically generated by Entity, so whenever I update or recreate the model the custom functionality will be lost. Ex...
asked by 04.05.2016 / 16:04
1
answer

How to validate a digitable line of billing tickets in the format 00000.00000 00000.000000 00000.000000 0 00000000000000? [closed]

Good afternoon, friends, would anyone have a procedure similar to this and what could you post here? It will be of great use to me and to future readers of this post. I await feedback. Here was my last attempt to translate this Del...
asked by 26.04.2016 / 18:14
1
answer

How to validate Date with Regex?

I'm trying to catch a date inside a string using regex, but when I try to retrieve the part of the string it returns me the following error:    parsing "\ RATE: ([\ d /] +)" - Unrecognized escape sequence   \ T. match = Regex.Match(sbDado...
asked by 13.06.2016 / 23:04
3
answers

Regex verify IP

I am implementing a regex to accept IP address, for this I am using a mask in the textEdit component of DevExpress, but when I leave the field blank or with only a filled part it locks all other controls of the form. Regex used: ([0-9]{1,3}\...
asked by 01.02.2017 / 12:55