Questions tagged as 'c#'

1
answer

XML deserialization to objects C # The specified type is not recognized:

I'm trying to perform the deserialization of an xml to an object. The problem is that when I try to perform this operation I get the following error: {"The specified type is not recognized: name = 'ProductTransfer', namespace = ' link ', in...
asked by 30.06.2018 / 00:22
2
answers

Assign a string as a reference to another string within an object

I am somewhat confused trying to do the following and I hope you can help me. I have a class with a series of strings: public class Ejemplo{ private string nombre; private string id; private string descripcion; ... } What...
asked by 05.05.2018 / 21:05
2
answers

Add template for email, already defined in .cshtml

I am sending an email to the user who forgot their password, the email can now be sent, but I would like to add a personalized template. I do not know if it would be possible to pass the view .cshtml as a body parameter to the email. I alread...
asked by 16.07.2018 / 16:33
3
answers

Go through a txt file StreamReader

I'm trying to go through a txt file with StreamReader , the problem I have is that I can never get past the first row of my txt file and I do not understand why. I have dealt with a for and with a while but I only cycle on the first row...
asked by 16.07.2018 / 22:01
2
answers

problems with ModelState.IsValid does not respect the required

I am doing validations to the text fields of a form through a model that I decorate with [Required] to require certain fields but cn the controller when I do the condition if (ModelState.IsValid) does not do the saving in the BD since the model...
asked by 13.04.2018 / 00:33
2
answers

When I insert data into a SQLite table, it says that the database is blocked

I am creating an application in WPF which inserts in a table of SQLite every login. When you are about to insert: throw this exception: The code of the method to insert is this: public void InsertValuesToDataBase (str...
asked by 04.04.2018 / 18:04
2
answers

Send 2 models to the return of View asp.net

In 2 different models I have a method that gives me a list each Lista<Categorias>------------------Lista<Rutas> I'm passing one using the following in the ActionResult of the view public ActionResult Categoria() { re...
asked by 22.04.2018 / 20:51
1
answer

iTextSharp does not matter DataGridView to MySQL and C # pdf

I have a Form that generates a DataGridView in which I show fields of a table. The problem I have is that you export the pdf to me in the following way: I do not know what's happening. Here is my code that generates the .pdf: priva...
asked by 23.04.2018 / 01:47
2
answers

I can not solve this problem c #

Hello, can someone tell me how to solve this? Define a Person class with 3 fields: Name, Age and DNI. Write an algorithm that allow the user to enter in a console a series of data of the form "NameDocumentAge". Once the entry of data, the pro...
asked by 24.04.2018 / 23:43
1
answer

Restart winodws form in c # after inactivity

It is possible that the values of my form windows (digase labels, textbox, picturebox, datagrids) are deleted or return to their null value after a certain time has passed and, if possible, how or what is the method to achieve this? And if so...
asked by 03.03.2018 / 03:15