Questions tagged as 'c#'

1
answer

The name 'Component' does not exist in the current context

I'm trying to create a view component to reuse on pages, I'm trying to follow some video tutorials. I have already installed via nuget the entire Microsoft.AspNetCore.Mvc, but when I try to call it from the viewpage, using @Component.InvokeAsy...
asked by 06.06.2018 / 16:57
1
answer

How to display records that have no referenced data in a query

I have 3 tables: Person CREATE TABLE Pessoa ( ID_Pessoa INTEGER PRIMARY KEY IDENTITY (1,1), ID_Telefone INTEGER FOREIGN KEY REFERENCES Telefone (ID_Telefone), Nome_PSOA VARCHAR(50) NOT NULL, CPF_PSOA CHAR(14) NOT NULL,...
asked by 04.06.2018 / 04:06
3
answers

How to separate the digits of a variable in C # in pairs?

How do I get a variable that has a 4-digit value, divide those digits into pairs and save them to other variables? example: 3025 = 30 25     
asked by 30.05.2018 / 03:59
2
answers

Binding inside a CompositeCollection does not work

I'm using a ComboBox in a WPF application and when a function is activated, it loads a List<string> from a webservice to an on-screen property. My problem is that I can not make the ComboBox update update when this property is chang...
asked by 27.03.2018 / 17:50
1
answer

Read from a predefined line in txt

I am doing a txt file to save some information from a root user (username, password, name, cpf, email) in order, and I would like to know how do I read just the line that I would like, cpf or email or user.     
asked by 28.05.2018 / 20:17
1
answer

Get XML value

I'm having trouble getting the true value of this XML: <boolean xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</boolean> I tried this way but I could not: var ns = xDoc.Root.GetDefaultNamespace();...
asked by 29.03.2014 / 16:39
2
answers

How to do Search and sort of TemplateFields in a GridView?

Basically, I have a table (GridView) on an aspx page whose data is defined by TemplateFields. For example: <asp:GridView runat="server" ID="grdProdutos"> <Columns> <asp:TemplateField HeaderText="Produto">...
asked by 02.04.2014 / 19:30
1
answer

Move image inside a picturebox with the mouse without using the scrollbar

Kindly, does anyone know how I can move an image within a pictureBox without having to click the scrollbar ? What I want is to move the image, just clicking the mouse on it so I can drag it inside pictureBox . This is the Form:...
asked by 09.04.2014 / 00:52
1
answer

Selection with Dapper using IN clause

My idea is to generate a search on my bank using the in clause through Dapper . For example: select * from product where CasNo in(@filtro) Remembering that within this @filtro has a list of CasNo that is of type List<...
asked by 22.10.2018 / 17:53
2
answers

Upload file via FTP TLS

I'm trying to upload files via FTP (TLS), but I'm not successful because it always returns an error when my code executes "Connect ()". I have already tried using the FtpWebRequest, FtpClient, Tamir.SharpSsh, and SftpClient classes. Any of them...
asked by 25.11.2018 / 01:43