Most voted "c#" questions
This tag should be used when the question refers to some resource, information or problem related to the C#language. C# ("C Sharp") is a multi-paradigm programming language that has strongly typed variables, is imperative, declarative, functional, generic, object-oriented and component-oriented, which are designed to be executed in . NET Framework.
Learn more…13,899 questions
Sort by count of
-
0
votes1
answer110
viewsGetwindowtext in C#
How can I use the Getwindowtext function in c# ? Need to convert this function into Delphi for c# function FindWindowExt(partialTitle: string): HWND; var hWndTemp: hWnd; iLenText: Integer;…
-
0
votes1
answer316
viewsVisual Studio project losing references via git
When cloning a project, it is coming with some blank references, having to add manually. This problem only occurs with cloned projects, if you download the project as zip from github, it works…
-
0
votes1
answer77
viewsExtract information from requests header in Fiddler
I need to extract information from the header of a request in the app FIDDLER to make a comparison of a context variable that is sent in the header and set routes based on that variable. In this…
-
0
votes0
answers45
viewsHow to paginate data? Via Storedprocedure or Dataview?
I am using Datatables.net with server-side via Webform and Ado.net. I need to paginate the data (sort, filter, etc), I see 2 possibilities: - via stored procedure ou - via DataView The problem is…
-
0
votes0
answers43
viewsSelecteditem no evento Mousedoubleclick
I have the following situation. A Usercontrol where I can choose a company to work, when I choose, I send it to the application title. My problem is that I can only choose the company with just one…
-
0
votes3
answers9343
viewsCheck if a date is valid
I’m getting a date in format: string: "01/03/2010 23:00" How can I verify that this date is valid? By validity, disregard questions of days or months being with wrong numbers. The validation would…
-
0
votes0
answers513
viewsHelp with reportviewer +MYSQL (tables+object data)
I have a problem with creating a reportviewer. I programmed a structure, which calls the report, passes a single parameter to the report, saves it as PDF, and opens it with the native PDF reader.…
-
0
votes1
answer329
viewsPagination x de y for Danfe in Report Viewer
Would anyone know how to make this pagination as in the photo example below? This paging is easily done in the header or footer of the Report Viewer, but apparently the pagination is in the body of…
-
0
votes1
answer214
viewsdoubt with file download
I have a folder in the cloud, and I want to generate a list in the html paginal, with all these files, so that when the user clicks, open the downlaod of the file, I am trying as follows(this code…
-
0
votes1
answer458
viewsDoubt about Reportviewer C#
Good evening, I wonder if you have how to put a text in the report for example I am making a receipt and put a textbox and I would like to put everything in the same line for example I received…
-
0
votes0
answers149
viewsError loading cascading dropdownlist
I am trying to load a dropdownlist cities according to the selected state and am encountering an error. I managed to carry out the operation in a template I downloaded from the internet, but I’m not…
-
0
votes4
answers275
viewsAPI project with many layers
I’m studying about API. I saw a design pattern with these layers: I found the layers Appservices and Domainservices unnecessary. For me the ideal would be to create only one layer of Services where…
-
0
votes2
answers902
viewsHow to send form fields by email in a table format?
My application takes some data that the user fills in the Textbox fields (txtEmpresa, txtContato, etc...) and sends it to a preconfigured email. I can send the data via smtp, but they are being sent…
-
0
votes1
answer132
viewsThe Member with Identity '' does not exist in the Metadata Collection?
I couldn’t find how to solve this problem between my base and my mapping using Fluent API. I have a Fluent API mapping of a certain pre-existing table in the client database, but this table has a…
-
0
votes1
answer36
viewsReference Xamarin PCL with external PCL’s
Ola personal arose a doubt recently I did a project in wpf using mvvm pattern in which Fis layered. Now I want to rewrite the same project with Xamarin, and reuse the same pattern, only I came…
-
0
votes2
answers686
viewsCan you create in C# a String array type property with 2 positions?
I have the following properties in a model: public List<string[]> Imagens { get; set; } public string[] Video { get; set; } public string[] Audio { get; set; } There in my Controller I am…
c#asked 8 years ago Wellington Fernandes 101 -
0
votes2
answers256
viewsWindows Forms and Panels
How to use a single form to present several screens, such as login, registration, administration, etc? It is possible using the panel component, but the rendering of it is slow, besides being…
-
0
votes2
answers391
viewsIs there a difference between First and Single?
There are some differences between First and Single? the return of the two consultations are equal? And in the performance between the two is the same? Which of the two expressions is best used?…
-
0
votes1
answer106
viewsHide form by pressing key
I created a form, I do not want to use minimize or maximize button, I want to use for example when pressing "F1" my form stay hidden and press F1 again it comes back to. I tried this, but to no…
-
0
votes1
answer1417
viewsHow to write and block the textbox by clicking the button
I wanted to know how to write a number in the textbox and block when the button is clicked private void button6_Click(object sender, EventArgs e) { textBox4.Enabled = false; } I managed to make it…
-
0
votes2
answers739
viewsInput string was not in an incorrect format
I’m trying to create a geometric graph looking for a Txt file but when starting the application appears this error I’m half beginner and I’m having difficulties to find the solution…
c#asked 8 years ago Reinaldo Teixeira de Paula 11 -
0
votes0
answers28
viewsWhat is the correct way to change the software version in C# with each build?
Currently I change directly in Assembly file.
-
0
votes1
answer318
viewsHow to Reset a Gridview c# aspnet?
I have two tables(Datatable) different and need to use them in the same Gridview. But when I call Gridview on the screen it always takes the value of the first table. Does anyone know how to make a…
-
0
votes1
answer73
viewsViewmodel parameter being passed as null
I am trying to validate my login form, but the "Modelstate.Isvalid" function is not performing the validation. According to the image above, when executing Action, the "Effectwindmodel" parameter is…
-
0
votes1
answer119
viewsHow to pick up values from a listview on another.xaml page
I have this class that fills the values in listview. public Lista() { this.InitializeComponent(); carregaLista(); } protected override void OnNavigatedTo(NavigationEventArgs e) { } public async void…
-
0
votes0
answers506
viewsI want to put a background song in my project C#
Guys, this is the code I created, but when I press the button, the form simply hangs and nothing else works, I can only close it by Task Manager, but in the project no error is shown... public…
c#asked 9 years ago Gian Lucca Dalle Cort 133 -
0
votes2
answers156
viewsI cannot capture the post by webapi c#
good morning. I’ve been trying for a few days trying to capture a POST made in Javascript by webapi c# and the most I can is the webapi telling me that the expected parameter is NULL. var…
-
0
votes0
answers446
viewsMultiple RDLC (Report Viewer) in a single report
I have a report in Report Viewer that is all injected via parameters, do not use Dataset. I need to make it print a header that would be a single report model (a RDLC file), the body would be…
-
0
votes1
answer53
viewsPrinting using Crystal Reports in WPF
I’m having difficulty printing using Crystal Reports on WPF, I use the same printing system for another system and it works normal, but on this system is appearing the following error... I believe…
-
0
votes1
answer641
viewsHow to generate Microsoft Excel spreadsheets in . NET Core?
I need to generate Microsoft Excel spreadsheets through .NET Core, there is some library that does this? In my research I could only find the Open XML SDK from Microsoft itself, but support for .…
-
0
votes1
answer61
viewsHow to create guides inside a window?
I need to create a program that displays the Forms that I call by Menustrip, inside the main form, as if they were part of it, and that can be left more than one open. I believe the image I made…
-
0
votes1
answer1369
viewsFrom the View how to get the Model in Partial View
In the View leading, Index.cshtml, carry a partial view where this has a model. How to make Index call this one model so that I can serialize and send to a action in the controller? Below is an…
-
0
votes1
answer184
viewsHow to delete the first and last name of a string
Original: string nome = "João da Conceição Lopes"; Expected result: string nomesDoMeio = "da Conceição";
-
0
votes1
answer39
viewsAction is not receiving the value of the parameter
In the code below I am trying to pass a parameter to an Action. The action is being called and the value of the parameter is also being assigned to Url. But Action takes Null, not the value of the…
-
0
votes1
answer652
viewsAjax redirection on ASP.NET MVC
I’m using Ajax to save the form data. The problem is that after saving the data have no way redirect to the "Action Index" where customers are listed registered, because the request was made in…
-
0
votes1
answer479
viewsOpen external program via mvc5
I’m having a hard time doing an operation. I have a console application that opens a PDF. This console takes the name of Servico.exe, although it has the service name, it is an exe and not a…
-
0
votes0
answers59
viewsData Return Excel VB.NET
I have a problem to return the excel data to a Datagridview... I am using the commands below Dim connectionStringExcel As String = "Driver={0};DriverId=790; Dbq={1};DefaultDir={2};Extended…
-
0
votes1
answer67
viewsConvert string to function
What is the best way to make a string to void conversion uncomplicated. I tried to use this code but it appears NullException private void Mainform_Load(object sender, EventArgs e) { var method =…
c#asked 9 years ago FRNathan13 2,183 -
0
votes2
answers705
viewsUse Ftpwebrequest with Uri https
Srs(as), good afternoon, I am creating a service that will upload some files to an FTP link, however this is like HTTPS (https://path/path). occurs that the class Ftpwebrequest does not allow the…
-
0
votes1
answer1417
viewsEditable combobox with filter
I wonder if there is a plugin or a tutorial teaching to create a combobox that allows, as you write on it, filter the items, as in the image below: Note: I am using ASP.NET MVC with C#.…
-
0
votes1
answer338
viewsI can’t download a file by Actionlink mvc5
I know the error is in the way I am interpreting the routine. I have a routine to download a file attached to a table. This file was generated by my application (binary) and now I need to write this…
-
0
votes0
answers87
viewsHow to perform button action within Listview Android C#
I created an android data query application, where they have the layout and Adapter ready to crud data, but the crud operation worked when data is entered and consulted. I was unable to make a…
-
0
votes1
answer35
viewsConversion of value from the database to monetary value with error
In the database(SQL) I have a field called Valor which is a decimal and contains the following value: 21581 that would be R$215.81 But in doing the casting of this value he is returning…
-
0
votes1
answer84
viewsI can’t register dates
I have a form with two dates, however, when I register them returns me the following error: Character string not recognized as valid datetime. What can it be? This application is done in four…
-
0
votes1
answer60
viewsPanel does not become invisible if Chart’s Paint event is activated
Good night, Staff would like a help, so with a doubt, well I am developing an application, in which the user chooses 5 dates of any working days of the month,e gera um gráfico diferenciado com a…
-
0
votes1
answer195
viewsShow image while hovering online mouse gridview
On an HR management site, there is a readiness history query. Here’s how the page was made: ASPX FILE <%@ Page Language="C#" AutoEventWireup="true" CodeFile="historicoProntidao.aspx.cs"…
-
0
votes2
answers87
viewsHow to list last 7-day birthdays with Crystal Reports and c# winforms
I’m developing a church management system, and I need to get all the faithful registered in the system, whose birthday is in the last seven days, counting the current date. I have created the…
-
0
votes0
answers91
viewsProcessing of a string in the view - Asp.net MVC
I have a public string TimeUpdate { get; set; } in my model that is of the form "13-12-2016 17:12:09".I need that in the view it appears only the hours and the minutes, as I can do the field…
-
0
votes1
answer49
viewsTransfer image from one Image control to another of the same type
I have these three controls: <Button x:Name="btn" /> <Image x:Name="imagem01" /> <Image x:Name="imagem02" /> Suppose I carry an image on "imagem01" using: OpenFileDialog ofdImage =…
-
0
votes1
answer743
viewsWork with C#image
I have two images: At runtime, I need to join the two images together. You can determine the position of the doll on the ladder. Both images are on disk. The result would be images like these in…