Questions tagged as 'c#'

1
answer

Read html file and get the value of a selected select

I'm reading an html file and need to get the value of value of the select selected by the user, how to do it? HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument(); var select = doc.DocumentNode.SelectNodes("//tab...
asked by 31.01.2018 / 18:20
1
answer

How do I put an image in Itextsharp?

I'm trying to put an image in the pdf, but the error because the Image class of ItextSharp only accepts Uri, and what I have is an incoming stream that already converted to System.Drawing.Image. public static Document GeraPdf(Stream stream)...
asked by 31.01.2018 / 17:31
2
answers

Problem when adding images C #

I'm trying to create an object of type Image from an existing image, which will be inserted into a Frame and in turn will be inserted into a > StackPanel . However, only images / icons that are inserted inside the project are displayed in t...
asked by 05.03.2018 / 23:02
1
answer

PostBack Asp.Net WebForms

I started working a little while with WebForms and was left in doubt, because I always mess with asp.net mvc . Assuming I have a DropDownList and populated DataSource with multiple records, when done PostBack...
asked by 06.03.2018 / 15:02
2
answers

When field validation is triggered, dropdownlists do not load in Asp.net core MVC

When I start a registration screen, the system loads ViewModel with combobox loaded:    IfI,forexample,clickthesavebutton,thefieldsinmyviewmodelarevalidated,butthepagedoesnotkeepthecomboboxloaded.Howtosolvethis?   publicclassPe...
asked by 05.03.2018 / 02:31
1
answer

Error opening View with values loaded directly from class

I have a default Login screen, where you have the "Forgot Password" feature, which when clicked will check the user ID number entered on the screen, and if it is respected, it will open a new View with this message:    Note XPTO = dbo.Clie...
asked by 24.01.2018 / 16:22
2
answers

C # WPF - Access element of another XAML by code

Hello, I have two screens a Window and a Page loaded inside the screen Class Window1{ //to do .. __mainFrame; // acessa normal } Class page1{ //to do __mainFrame; // sem acesso ao frame } Inside the window class I have a <Fram...
asked by 22.01.2018 / 19:45
1
answer

How to call an "Admin" role in an IF in C #?

I have created several roles for me to do an access control. So I want to know how to call the admin role so I can pass in an if, type example that I'll put below in my _layout: @if ("Aqui que eu preciso saber como chamar a role admin")...
asked by 22.01.2018 / 13:38
1
answer

How to check if the "DLL" files were successfully registered

I need to check if the process has been successful, in case the extensions it will try to register are: .DLL .OCX The code I'm using to register is this: string pathcli = copiar + nomedofonte; if (!nomedofonte.Contains(".exe") ||!nom...
asked by 23.01.2018 / 16:13
1
answer

Read file from a folder and determine if it is the same as the site [closed]

I'm doing an autoupdate launcher in C # .net and I need my program to read a database file that is in the same folder as it and see if it is the same as my site, and if it is different, p> Does anyone know if this is possible?     
asked by 20.02.2018 / 10:37