Questions tagged as 'c#'

1
answer

How to enable CORS for web page access from a different domain in Asp.Net MVC

I'm developing an application that is communicating with Secure Paging Checkout through the Web Server link that is working perfectly, after making the payment PagSeguro provides the possibility to indicate a page in my application to receive...
asked by 15.10.2018 / 14:40
1
answer

Execution console hangs while doing many reads in debug mode!

In order to debug the code for errors, many times I need to enter the requested data, but it is not always possible to reach the end of the program because the execution of the debug via "F10" or "F11" (if tell the difference) it blocks making i...
asked by 31.08.2018 / 22:14
1
answer

Error displaying accented words in View

Good afternoon, All words that have an accent on my system are being formatted wrong as in the example below:    Auto Inspection Where it was supposed to be an inspection car. How to solve this, knowing that I'm using C # with Razor an...
asked by 04.09.2018 / 19:52
1
answer

Alternative to Unit of Work + Repository for sharing DbContext [closed]

I've seen people saying several times that it does not make sense to use Unit of Work + Repository with DbContext Unit of Work with repository Is it supposed to be "more secure" to use DbContext directly on a service layer? like: public c...
asked by 07.10.2018 / 18:51
1
answer

Run Event TextBox c # WPF

I have a Textbox and need to press the right button and click paste, it checks, tried several methods like TxtTexto.PreviewMouseLeftButtonDown+= new MouseButtonEventHandler(OnMouseClick); TxtTexto.MouseUp += new MouseButtonEventHandler(OnMouse...
asked by 05.10.2018 / 22:24
1
answer

Display product result of two variables with periods instead of commas (C #)

I am solving an exercise where it is necessary to state the number of an employee, how many hours he works and how much he receives per hour, then the system should display the number of this employee and his salary, the problem is that the resu...
asked by 06.10.2018 / 17:15
2
answers

How to get snippets between () a string

I'm doing a program that reads any math expression such as x^(3*x+1) + (cos x) , does not necessarily have to be that expression, and I'd like to know how to get the specific snippet between strings in the string.  I know that with Inde...
asked by 24.08.2018 / 15:37
1
answer

Register Header on a SOAP service reference in C #

I would like support. I'm having serious problems with a client. I have a C # application that fetches data from a system and sends it data to a SOAP service. This SOAP service requires a header: <soapenv:Header> <wsAutenticacao>...
asked by 19.09.2018 / 21:16
1
answer

Improve routes

People have some better way to do these routes? Or for every action in my Controller, will I have to create your routing? app.UseMvc(routes => { routes.MapRoute( "Login", "Login",...
asked by 19.09.2018 / 19:44
1
answer

Validate date in editfor

I made a date mask and would like to know how I validate the date right there, ie, in the edit it does not accept data type: 23/16/9087 . This is my date editfor <div class="form-group"> @Html.LabelFor(model => model.dataNasc...
asked by 10.08.2018 / 23:06