Questions tagged as 'c#'

3
answers

Authenticate (LOGIN) with Google Security System

I develop an ASP.NET WebForms application and I need that if the user has authenticated in the browser with a Google account he can access the page otherwise.     
asked by 17.06.2016 / 17:56
2
answers

Search data in Sql and display them in C # ComboBox

Good afternoon. I would like to know how I can show data in ComboBox . This data I look for in SQL and I show them in a DataGridView but I would like to show it in a ComboBox , this is what I have of code. public DataTabl...
asked by 25.11.2016 / 21:54
2
answers

How can I show the value of a variable on a screen within a text in c #? [duplicate]

I'm doing a desktop application and I want to show the value of a variable on the screen inside the quotes this is my code static void Main(string[] args) { int casa = 16; Console.WriteLine("variable {{casa}}");...
asked by 19.07.2018 / 14:00
2
answers

Duplicate files when uploading them in ASP.NET MVC

I have the following code which I use to register images and pdf's, the problem is that up to the moment when I register for example two different images I save 1 but 2 times. And in the case of the PDF what I want is for me to save only one for...
asked by 13.06.2017 / 20:00
3
answers

Validate a textbox in C #

How can I make my textbox accept only the 0 and the 1. Or only accept a character. This is the code I have. private void press(object sender, KeyPressEventArgs e) { if (Char.IsLetter(e.KeyChar)) { e.Handled = tr...
asked by 22.11.2016 / 18:00
1
answer

Implement CustomException

I have a messaging class, in which valid if any required field is empty or business rules which information by a string variable comes to the presentation. public class Mensajeria { Resto de código } My question is implementing CustomEx...
asked by 13.04.2016 / 19:42
2
answers

Consume Rest API in C #

I would like you to guide me a bit with this. I am trying to consume an API Rest in C # and have an authentication where I must pass these parameters or values: username , password , client_id , client_secret , grant_t...
asked by 03.04.2017 / 17:23
2
answers

Create form for Model List

I have a Model called Question: public class Pregunta { public int id { get; set; } public string descripcion { get; set; } public int peso_id { get; set; } public List<int> roles_id { get; set; } public int dimension...
asked by 07.06.2017 / 17:04
1
answer

Possible inheritance between properties of the same name but of a different type?

I am implementing a client of a service that provides me certain classes through a WSDL. In itself these classes build a structure a bit complex, but connecting to 2 service methods the answers are almost identical in terms of objects, with the...
asked by 05.12.2017 / 20:31
2
answers

Play video in MediaElement WPF

I'm working on a WPF desktop application, Windows 10, Visual Studio 2015. In which when going to the location of the video is played, I have the following code. XAML: <Window x:Class="ReconocimientoVoz.MainWindow" xmlns="http://sc...
asked by 04.10.2017 / 00:19