Questions tagged as 'c#'

2
answers

How to get the value of an attribute in an html tag with JQuery

Friends What happens is that I need to capture the value of an attribute of an html tag in this case. <input class="btn btn-danger link1" type="button" value="Delete" data="@item.MunicipalityId" /> I have this tag inside a cyc...
asked by 13.06.2016 / 22:06
1
answer

List FTP Server Files

I am trying to create a simple application that allows me to list the files of an FTP server but I have not managed to do it. If someone has a simple way to do it, I would be very grateful.     
asked by 05.06.2016 / 22:18
1
answer

Convert XML to Object C #

I have a string , in which I keep the serialization of an object in XML format, leaving the following form: <miObjeto> <id>01</id> <Lista> <elemento>1</elemento> <elemento>2</eleme...
asked by 21.02.2017 / 17:55
3
answers

Object reference not set as an instance of an object. Asp.net MVC

Add two more fields to the beneficiary class and I made the migrations now it is showing me this error. //Model [Table("Beneficiarios")] public class Beneficiario { [Key] public int beneficiarioId { get;...
asked by 26.07.2016 / 17:10
3
answers

How to clone an object in c #

I'm trying to duplicate a viewmodel, req is a viewmodel of the same type as copiaReq that arrives me by parameter RequestMeetingRoom copiaReq = new RequestMeetingRoom(); copiaReq = req; copiaReq.IdMeetingRoom = 3; The problem...
asked by 10.08.2016 / 13:22
2
answers

How to make an already developed project have url friendly for SEO?

I have a project MVC C # already developed, now they want the url's to be SEO friendly, for this they already passed me an excel of how they should be an example: /ProductDetail?productId=10 => /nombre-de-producto I do not know if t...
asked by 18.10.2016 / 16:56
5
answers

HttpContext.Current.User.Identity.IsAuthenticated is always false

I am trying to recover the currently logged-in user on my system, but for some reason the IsAuthenticated property always returns a false : I'm using this class to set the user to the context and to retrieve the logged-in user, which is in...
asked by 13.04.2016 / 22:04
2
answers

Directly access the overwritten member?

Good! I have 3 classes, one is TokenBase , which is used as the parent of the other classes: abstract class TokenBase { public TokenTypes Type { get; set; } public virtual object Value { get; set; } public override string ToS...
asked by 19.04.2016 / 15:56
1
answer

Delete Pdf in c #

How can I delete a PDF file once I close the document? Does anyone know how to do this in C #? Now I have the code that opens the PDF, but I want to close the PDF automatically. var pdfProcess = System.Diagnostics.Process.Start(ruta);     
asked by 29.03.2016 / 01:16
1
answer

Get procedure OUTPUT and save in a txt

You can help me the result of a output save it in a .txt using C # and SQL SQLServer create table Dedito ( ruc nvarchar(11), nom varchar(max), asd varchar(max), ddd varchar(max) ) go insert into Dedito values('20532803749','danilo'...
asked by 25.09.2018 / 22:34