Questions tagged as 'c#'

1
answer

How to clean the cahe in Asp.Net Mvc5

I have an application made in Asp.Net mvc5 and every time I make a change, in my css or js files, I have to go clean the browser cache manually, as a developer there is no problem, the problem is when the application in production, I can not be...
asked by 28.11.2018 / 17:57
2
answers

How to execute sql statement that is stored in a string in C #

I have the following SQL string in a string to update tables from textBox. string actualizar = "update pelicula set nombre_pelicula = " + txtnombre.Text.Trim() + " , web_pelicula = " + txtweb.Text.Trim() + " , descripcion = " + txtdescripcion....
asked by 14.11.2018 / 01:01
3
answers

use of the for loop in c #

Hi, I'm learning c # (I already have some experience in python) I'm learning about the for loops and I really do not see much use for them if I already have the while loop, I know that the while is indeterminate and the for is determined but...
asked by 11.10.2018 / 03:35
1
answer

Implement Http Headers in Ionic-Angular Project (Enable Cors in Api Rest)

I am trying to consume an ApiRest, but because they added a token validation, I can not consume it. Before they added that validation, if it managed to consume it correctly. As you have to send the token, I can not consume it. The error is as...
asked by 02.10.2018 / 19:55
2
answers

How to subtract dates in a linq query

I need the subtraction now - a.DateLowStock to be> = 14 days. How can I do it? ICollection<Product> products = new List<Product>(); DateTime now = DateTime.Now(); using (ApplicationDbContext db = new Applic...
asked by 07.11.2018 / 19:38
2
answers

Update SQL Server through Visual Studio ASP.NET web forms

I'm trying to do update in a DB, but I'm not making the changes to that command. When I do it in the direct query of SQL server it works, but when I do it from my application it does not do the update . This is the query in SQL Serv...
asked by 07.11.2018 / 05:30
1
answer

Create 'struct' with string fields of a length or array char with a length

I want to create a type 'struct' composed of some fields that must be an array of char with a certain length or a string with a certain length. Currently I have declared it this way: public struct Header { public char[] entityCode;...
asked by 21.08.2018 / 12:20
2
answers

How can I explicitly cast in an image? C #

Through an API this returns an image (supposedly), so I created a list with all the images I needed to cast them in a pictureBox, without emargo, I get the following error:    Unable to convert the type implicitly   'RiotSharp.StaticDataEndPo...
asked by 14.08.2018 / 21:24
1
answer

C # Problem when updating registration with mysql "Windows Form"

Well send me this error message    "You have an error in your SQL syntax; check the manual that   corresponds to your MySQL server version for the right syntax to use   near 'id_raza = 8' at line 1 " This is my method to update public bo...
asked by 19.09.2018 / 07:45
2
answers

Can I know with SendGrid if an email arrives or does not reach its recipient when I send it?

var client = new SendGridClient(this.apiKey); var from = new EmailAddress(_from); var subject = _subject; var to = new EmailAddress(_to); var plainTextContent = _plainTextContent; var htmlContent =...
asked by 18.09.2018 / 19:30