Questions tagged as 'c#'

1
answer

Generate executable in c # [closed]

I was interested in knowing how an executable could be generated from another executable. Let me explain, let's imagine that I have a form where in some textboxs they are asked, what do I know, an email, subject, message etc ... But I'm no...
asked by 19.10.2018 / 05:31
1
answer

Alphabetic ordering c #

I have a program in C #, that entering the names of three countries with their respective temperatures, calculates the average annual temperature of each one. Then he prints them in alphabetical order. When finished, print the country with the h...
asked by 25.10.2018 / 06:05
3
answers

Avoid duplicate records in C # and PostgreSQL

Hello colleagues I have a form where I register the members of a club but I would like to insert a record if I reject it if it already exists and if it does not exist that I insert it, this is my code. NpgsqlConnection cn = new...
asked by 19.11.2016 / 22:07
2
answers

Iterate over sublists within a list

I currently have a list of the Activity class, this class, among other properties, has one that is Operational. The fact is that I take charge of all the activities of all the workers in the lAux list and what I need is from that great list t...
asked by 22.11.2017 / 13:04
3
answers

Validate that a chain is not repeated

I would like to know how I can validate that a string does not duplicate when inserting lines in a text file, since each line contains different information, but until now I only manage to transfer the first line by the number of records...
asked by 21.04.2017 / 00:31
2
answers

Web API Default Route does not work when it receives a parameter

I am using Web Api 2.0 together with MVC 5 This is my WebApiConfig config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional }...
asked by 04.04.2016 / 15:13
2
answers

Validate the username and password using LINQ

Goodnight I would like you to help me I am making a query with Linq of the programming language c # since I am doing a validation for a user login my code is this: public class D_Usuario { private DataModel.DataModelDataContext...
asked by 22.04.2017 / 06:06
2
answers

How to pass two parameters to a controller via ajax

I'm working on an ASP Mvc project, I have the following controller: [HttpPost] public ActionResult Asociar(int? id, int proveedorId) { return PartialView("Companies"); } In my view I pass these parameters in the following way: <a...
asked by 01.05.2016 / 06:09
2
answers

How to invoke a C # method from a JavaScript function?

I need to call a method c # from a JavaScript function ... at the moment the user tries to leave the page ... in such a case that my function can be as follows window.addEventListener('unload', function(event) { // Invocar Metodo C# AQUI })...
asked by 11.08.2016 / 15:16
3
answers

Know what was clicked by the user method confirm

I have the following instruction with which my pretensions are to indicate to a user if he wants or not to print a report. in case it is True print and in case it is false redirects only Response.Write("<script lengue>c...
asked by 07.11.2018 / 22:21