Posts by Marcos Junior • 123 points
20 posts
-
0
votes1
answer38
viewsA: Remove columns with Null from Datagridview
It took me two iterations to do this work, one to go through the columns of the datagridview and store the name of the columns that have the row with null value and the second only to remove. This…
-
0
votes1
answer36
viewsA: how to validate for name not to receive numbers or special characters c#
This expression is invalid, and it looks like you tried to include a character limit in it, something that doesn’t make much sense since you already use the attributes MaxLength and MinLength. Try…
-
0
votes1
answer42
viewsA: How to compare if an excel text is equal to part of the name of a pdf file in C#?
To go through the files of a folder you can use the method GetFiles of DirectoryInfo. DirectoryInfo directory = new DirectoryInfo("Caminho completo da sua pasta"); //Irá selecionar todos os arquivos…
-
0
votes1
answer70
viewsA: CS1503 error: Argument 2: cannot convert from "string" to "Microsoft.EntityFrameworkCore.Serverversion"
The error seems to be very clear, you are passing a string instead of an object of the Serverversion type. See the parameters that the Usemysql method waits for. string connectionString =…
-
0
votes1
answer27
viewsA: .NET Core JSON parameter
When you set your route this way [Route("getByChannelName/{searchParameters}")] Your method is waiting to receive a single parameter. You set your method to HTTP/GET, by default it does not check…
-
0
votes1
answer16
viewsA: Use Datetimepicker as parameter
The value of Datetimepicker is Datetime type, so you just need to convert it to string. Your code would look something like this: //assumi que você tenha dois DateTimePicker para realizar a consulta…
c#answered Marcos Junior 123 -
0
votes1
answer15
viewsA: Viewbag resetting when returning page on Razor Page
Viewbag, Viewdata does not have this purpose, they are for data transfer from the inside out only and are discarded along with your page at the time you make the post. In your case, what you can do…
-
0
votes1
answer41
viewsA: ASP NET Core Dynamic value "Route"
Passing the parameter on the route between keys [Route("{uf}")] //uf assumirá o valor para o parâmetro Another detail you mentioned in the comment for cases where the value may come null. you can…
-
0
votes1
answer28
viewsA: How to automatically switch and show between MDI child windows on a parent MDI in c# visual studio?
Which error is showing up? You declared the variable within the iteration foreach, and is trying to access it outside. Another thing, you guarantee that the Text form will be exactly the same as the…
-
0
votes1
answer23
viewsA: How to start Timer.Start a service by clicking a button?
If the two applications are on the same machine, you can manipulate them through files. You make your button create a file inside a folder, which as soon as your other application finds it, it…
-
0
votes1
answer38
viewsA: Make panel invisible when opening Form
You just need to create an event FormClosed to the Form2. Following the same code idea you did, I added the call to the event. private void button1_Click(object sender, EventArgs e) {…
-
1
votes1
answer35
viewsA: How to change the Listbox Index to 1?
You haven’t said exactly what mistake or problem you’re having. I simulated your code here on my side and the only mistake I found was that this condition allows you to add an extra item to the…
-
-1
votes1
answer91
viewsA: Generate Token API access
Use some symmetric encryption that only your application can decrypt. Generate an access link by passing the information you want by parameter. //Algo que voce consiga identificar o usuario int…
-
0
votes1
answer80
viewsA: Capture keystrokes even if pressed outside the app
Vi here a code you can try. Using the dll User32 combined with a Timer in your Form, you can check the keys that are being pressed. I do not know if it would be the best way to be used, but I tested…
-
1
votes1
answer71
viewsA: Modal bootstrap opening a redirect page that should not be inside it
As you are making the request from an ajax function in your view, you will get the return there as well. If you give a.log(res) console, note that it says there is a redirect. I suggest you change…
-
0
votes1
answer90
viewsA: CORS policy . net core and angular 8
There are many things that can cause this type of error related to Cors. Put your complete Configure and Configure method to analyze. What I can say is that the settings must have an order according…
-
-1
votes1
answer93
viewsQ: Angular does not recognize variable inside a Javascript Function, integration with Pagseguro
I am consuming Pagseguro service in an Angular application version 10.2 and I am having this problem: Inside a function in my component I call an object of type PagSeguroDirectPayment, and I can’t…
-
0
votes1
answer45
viewsA: How to prevent a record when edited to save in duplicity?
Difficult to analyze the error just with this code. Your theme is duplicating when you edit or add a client? Make sure that when saying the customer theme, you’re letting the Entity framework do the…
-
0
votes1
answer52
viewsA: C# Applications. Net MVC how to share login
What you can do is store the data from the user’s browser at the time they first log in, and whenever you need to call the login method, you capture that data and do the verification. The problem is…
-
0
votes1
answer198
viewsQ: Help to debug in visual studio
Is there any way in the visual studio from one breakpoint to another kind of thing that’s between them? I have a giant and complex system, which almost always gets as far as I want, and it is…