Questions tagged as 'c#'

1
answer

Why can not I have the password hash in my seed method?

I'm trying to use my method seed below to create a user in the database when it's created: protected override void Seed(CodingCraftMod1Ex4AuthMembershipContext context) { string password = PasswordsHelper.EncodePassword("123456", Sy...
asked by 30.12.2018 / 01:08
1
answer

How can I run Javascript (most current possible) in C #?

First I tried to run with a control WebBrowser WebBrowser webBrowser1 = new WebBrowser(); webBrowser1.Visible = false; webBrowser1.Navigate("about:blank"); webBrowser1.Document.Write("<html><head></head><body>&...
asked by 22.12.2013 / 01:21
2
answers

Model error on a razor page

I have this cshtml @model IEnumerable<TreinamentoCrud.Models.Cidade> @{ ViewBag.Title = "Index"; } <h2>Index</h2> <p> @Html.ActionLink("Create New", "Create") </p> <table class="table"> <tr...
asked by 09.08.2018 / 15:28
0
answers

Problems with Threads in Windows Form

I'm trying to implement Threads in my algorithm, but when I add and run my software the Windows Form of it hangs and does not take any action, can you see something wrong in the code below? I know there is Async/Await to be...
asked by 12.08.2018 / 06:14
1
answer

Portable Database for WPF + C #

I'm creating a form in WPF + C # in VS Express 2013 for Desktop. Is there a SQLite-like database that I can use with C # + WPF? Since I came from Delphi development I got used to always having to install a server for the database.     
asked by 14.03.2014 / 18:51
2
answers

Create and Edit OneToMany with ViewModel

I'm creating a simple news application in ASP.NET MVC 4. I have a News category and a Category. I made a ViewModel public class NoticiaCategoriaVM { public Noticia Noticia { get; set; } public SelectList Categorias { get; set; }...
asked by 07.03.2014 / 20:44
0
answers

How to use functions of class A in class B and vice versa?

Hello, I'm trying to make a game but I found a problem where I can not solve it, maybe the answer is pretty stupid, but since I'm a bit busy, I can not find it at all. This is my first class or Script, which controls the player public class...
asked by 18.06.2018 / 02:13
0
answers

WPF and the MVVM standard, doubts

I'm studying C # and am having to develop a WPF application with the default MVVM. A question I have about this pattern is in relation to events, I have read in some places that it is not recommended to use events and also that we can not access...
asked by 19.06.2018 / 18:05
1
answer

The configuration section can not contain a text element or CDATA

The error began to appear when I added the variable: <add key="Teste" value="true"/> Entire App.Config: <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="Teste" value="true"/...
asked by 05.06.2018 / 20:22
1
answer

Buttons with images in WPF

I'm new to WPF and I'm trying to create a button, where the content of it will have only a background image and nothing else. It will have no border, background color or text, just a clickable image. I tried to do it: <Button> <...
asked by 31.05.2018 / 14:56