Questions tagged as 'c#'

1
answer

How to change the name of the cookie that the token creates in the forms?

I have a form where I occupy @Html.AntiForgeryToken() which creates a cookie of name __RequestVerificationToken which I want to hide. For this I thought about changing the name of that cookie to another one so as not...
asked by 13.06.2018 / 23:52
1
answer

Show of a certain time window form c #

Good I'm doing in window form a module where I have 4 label and a button. At first those label will be hidden and when you press the button the first label appears a certain time once the second label appears also appear a certain time a...
asked by 12.06.2018 / 13:49
3
answers

Problem in XML document declaration [closed]

I create an XML document from code, and I need the statement to look like this: <?xml version="1.0" encoding="UTF-8"?> With the code that I wrote it only shows the version, How can I do it to show the coding? <?xml version="1.0"?...
asked by 07.02.2018 / 15:05
2
answers

Update my DataGrid in C # without using buttons

I tell you I am trying to update my datagrid without the need to give any button. This datagrid is filled by making calls to a database. It had occurred to me to use threads for in the background to update the calls every so often as if it were...
asked by 20.03.2018 / 20:26
1
answer

What is the difference between DTOs and ViewModels? [closed]

   I can not understand their difference and what is the purpose of using AutoMapper     
asked by 26.03.2018 / 19:17
1
answer

Differences HttpRequest and httpRequestBase

From the controller the controller class gets the property Request and from System.Web.HttpContext.Current.Request but I do not understand the utility: public class HomeController : Controller { public ActionResult Index(Http...
asked by 04.11.2016 / 20:34
1
answer

Remove a row from my ASP.NET gridview

How can I remove a row from my gridview in asp.net once I select a record, without affecting the database, ie the list is in memory. This is the code as I charge my GriewView: private void Cargar() { srvLeyenda = new Srv_Ley...
asked by 10.09.2018 / 06:15
2
answers

String to Enum with generics

How to convert string to Enum in a generic method? public static T EnumFromString<T>(string value, T defaultValue) where T : Enum { return ....; }     
asked by 09.01.2018 / 17:15
1
answer

Query with 3 tables

I have 3 tables that are: Control, Buyers and Titles. In my Control table I have Code, Date, State, Buyers and Titles Id. In my Buyers table I have Id and Name, As in my table of Titles that I have Id and Name. My General query is the following:...
asked by 28.11.2017 / 19:47
1
answer

C # Does not execute stored procedure + trigger

Friends how are you! I have a stored procedure that inserts records in a table, which I run from a WinForms application, I was making some modifications and I added a Trigger to the table to which the procedure inserts the data. But alread...
asked by 14.06.2018 / 16:22