Posts by Ricardo Alves • 484 points
27 posts
-
0
votes1
answer36
viewsA: Linkedin Angular 7 authorization api and route
I managed to solve problem by following this answer in the SO, and to me that I am beginner in front development, thing I do very rarely, was something I really did not understand. In case of link…
-
-1
votes1
answer36
viewsQ: Linkedin Angular 7 authorization api and route
I’m having a problem developing a login screen using Angular 7 and the Linkedin API. Backend is written in C#, and the problem is: Linkedin requires a callback URL, and as far as I was able to…
-
0
votes1
answer544
viewsQ: Upload files and other data from Angular 7 app to Asp Core Web Api 2.1.1
I’m having a problem uploading files using Angular 7 to API written in c# Asp Core 2.1. Searching the web I found several examples uploading the file only, but I need to upload the file and in the…
-
0
votes0
answers48
viewsQ: React and Web API - How to submit form with files
I’m using React for front development and c# Web API for back. I am trying to submit a form that has an input file, in the API I created a Viewmodel to receive this data. Before submitting, I place…
-
0
votes1
answer141
viewsQ: C# Web API 2 - AJAX Request for PUT method returning 405 (Method Not Allowed)
Good morning! I am building a system using C# as back and React on the front, and I have a problem in two controllers (supposedly), but the error seems to be the same, and whenever I make an AJAX…
-
3
votes1
answer142
viewsQ: Form with list in React
I’m on my first project with React, and I’m totally lost with a. My form must submit customer data, and within that same form I can have two addresses. Since both addresses have the same attributes,…
-
1
votes4
answers567
viewsA: How to know if the first character of a string is capitalized?
A simple way to check whether the first character is capitalized (or not) is: char.IsUpper(kings[0])
-
0
votes1
answer208
viewsA: ASP.NET Identity - Find user by email and password
Problem solved. For this, I recovered the user by email, and soon after I logged in using his name, as follows: var retorno = userManager.FindByEmail(viewModel.Login); var usuario =…
-
1
votes1
answer208
viewsQ: ASP.NET Identity - Find user by email and password
I’m using Asp.Net Identity for the first time, along with the Entity Framework, and to create a user, I do the following code: var identityUser = new IdentityUser { UserName =…
-
2
votes1
answer707
viewsQ: Visual Studio Error - Cannot find name 'Record'
I am working on an ASP.NET project with c# in Visual Studio 2015 and I came across an error in the file index.d.ts. The error messages are Cannot find name 'Record' and Cannot find name…
-
1
votes1
answer76
viewsQ: Error using Sqlcommand and foreach
I’m trying to go through a list of objects and persist your data in Sqlserver: foreach (var item in pedidos) { cmd.CommandText = "INSERT INTO MinhaTabela (Coluna_A, Coluna_B, Coluna_C) " + "VALUES…
-
0
votes3
answers1677
viewsQ: How to disable Submit from a form by "Enter" - c# MVC
I am developing a web project in c#, and for Forms I am using the Html.BeginForm. How to disable Submit by pressing the key Enter? Can do without javascript?
-
2
votes1
answer382
viewsQ: Error c# and Mysql: Authentication with old password no longer supported, use 4.1 style passwords
Context: We have an application built a few years ago in ASP 6 that accesses a Mysql database, there on Localweb. To make the connection, the application uses the Mysql ODBC 5.1 driver. and works…
-
3
votes2
answers67
viewsQ: Route c# redirecting to wrong action
I have an action that returns a Partialview [HttpPost] public ActionResult SelectCidadesPorCodigoUF(int idUF) { //It do something and returns a PartialView } This action is mapped as follows:…
-
4
votes1
answer532
viewsQ: How to get the hostname of the client using c#?
I need to save in which machine the user performed certain action, for this I was using the following excerpt: string maquina = Dns.GetHostName(); However, little did I know that this returns me the…
-
1
votes2
answers2646
viewsQ: How to take an ENUM constant for the entire value?
I have an Enum that represents the months: public enum Mes { Janeiro, Fevereiro, Marco, ... } How do I get the month description for the entire amount? E.g.: Enter with 12 and return December…
-
0
votes1
answer288
viewsQ: Is it possible to define an HTML tag in a C#string?
I have the following string written in C#: string Descricao = "Você ficou muito tempo inativo, e por isso sua sessão caiu. Retorne para a página inicial para continuar." I would like to put the…
-
3
votes2
answers122
viewsQ: Is it correct in MVC to access data within the model?
In a C# MVC project, it is correct to access data within the model? For example: public class Cliente { public int Id { get; set; } public string Nome { get; set; } //outros atributos... public void…
-
2
votes2
answers1290
viewsQ: How to check Null in a select @Local_variable
To set a default value for a local variable, if the select that should "set" it returns NULL? For example: DECLARE @Minha_Var VARCHAR(70) SELECT @Minha_Var = Nome FROM CLIENTES WHERE Id = 10 This…
-
1
votes2
answers1006
viewsA: ISNULL in a Case When
I solved the problem simply, (I was surprised, I didn’t know it worked): ISNULL(CASE WHEN EXISTS(SELECT Id FROM TabelaA WHERE ColA = 10) THEN (SELECT ColA from TabelaA WHERE ColA = 10) ELSE (SELECT…
-
1
votes2
answers1006
viewsQ: ISNULL in a Case When
I’m making a select using the CASE WHEN in Sql Server, so that the existence of a record is checked, if it exists, it selects in a table, otherwise it selects in another table, but the two can…
-
2
votes1
answer885
viewsQ: Bootstrap Datepicker in mm/yyyy format set maximum date
I’m using Bootstrap Datepicker in mm/yyyy format, but I’m having trouble defining the longest possible date.The Code is like this: $('#mesVigencia').datepicker({ format: "mm/yyyy", startView:…
-
0
votes1
answer185
viewsA: Check Box "Check All" does not work for all pages using datatables
I found the answer here. This is the manipulation of table Rows when using Jquery Datatables.…
-
1
votes1
answer185
viewsQ: Check Box "Check All" does not work for all pages using datatables
Setting: I’m using Datatables to show a list of cities, and each of them has a checkbox. I also have a "Check All" in which, obviously, when marked, all cities should be marked as well.Problem: When…
-
1
votes3
answers5329
viewsA: How to Remove Header and Footer with @media print CSS?
Paula, try this on your @media print: @page{size: auto;}
cssanswered Ricardo Alves 484 -
1
votes1
answer691
viewsQ: How to verify, amid a select, the existence of relationship of a record of an A table with records of other tables
I already know I’m a beginner and maybe I’m asking something simple, but come on. I have two tables, PROMOTIONAL and PRODUCTS, and a PRODUCT can relate to zero or many PROMOTIONAL records. What I…
-
0
votes1
answer431
viewsQ: Display alerts in an Application Console c#
I warn you that maybe my doubt is too primary, but come on... I’m doing a c#console project, but I’m having trouble displaying error alerts. What I wanted to do was leave a separate part of the…