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
-
1
votes1
answer213
viewsSelect City and Status [Filter]
I would like to create two ListPicker or even a LongListSelector, so that when the user selects an "x" state, cities in another ListPicker or enter another window with another LongListSelector, the…
-
1
votes1
answer545
viewsHow to upload multiple images to SQL Server using JSON in ASP.Net MVC?
I need to insert a set of information into the SQL Server database data, but along with them some pictures along with some strings. I’m wanting to move everything by JSON. Input to select image:…
-
1
votes1
answer85
viewsHow to add groups and items to an Objectlistview?
Good afternoon Personal. I’ll rephrase the question and try to express myself better... I am using the `Brightideassoftware.Objectlistview , is not the traditional Microsoft Listview - Visual Studio…
-
1
votes1
answer179
viewsAccess App_data content through the business layer (Classlibrary)
I need to upload a file that is in the folder App_Data, but I saw that it is not possible to use the Server.MapPath in my business layer. Which approach is most appropriate for this case? Add the…
-
1
votes1
answer241
viewsStarting the Windows Media Player component in fullscreen
When the application with Windows Media Player opens (Windows Forms) always have to press the button fullscreen to maximize the video that is running and would like it to start already in full…
-
1
votes1
answer619
viewsHow to concatenate fields in the Line and rename
I made a Burst and it is not working concatenation and renaming it. See: var monta_arvore = (from rup in db.Ruptura from apr in db.Apresentacao.Where(ap => ap.Codigo_Apresentacao ==…
-
1
votes0
answers33
viewsWhat happens when I declare to be using (using) a namespace in a class?
When I declare the use of a namespace (example: using System;) in a Cs (C#) file, what happens? Am I just putting the classes belonging to the namespace in the scope of the class? Is there nothing…
-
1
votes1
answer706
viewsHow to pass data from a Dataset to an Excel spreadsheet C#?
I read sheet by sheet from a flat, and stored in a Dataset. I’m having trouble passing on to another flat this data from Dataset. Can someone help me ? I have the second code: conn.Open(); string…
-
1
votes2
answers330
viewsHow to execute C# query for request control
I am new to programming and need to add some functionality in a C# Asp.net. One of them is a control that prevents the user from proceeding with the request if he has any pending in the system. I…
-
1
votes2
answers272
viewsCreate Database with Fluentnhibernate
Is it possible through Fluentnhibernate to create the database as tables are created? I have the following class: public class Helper : IRepositorioHelper { private static ISessionFactory…
-
1
votes1
answer496
viewsParsererror error when making an AJAX crossDomain request
I created this page to test a request cross Domain with AJAX: <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"> </script>…
-
1
votes1
answer123
viewsIs there any way to give the columns an automatic width?
I’m assembling a report via Itextsharp and have read about how to assign specific widths to Pdfptable columns, however I would like this width to be automatically assigned according to the content…
-
1
votes1
answer171
viewsHow to avoid reducing the width of the columns?
I’m using the itextsharp library for PDF reporting and although I can generate documents with a nice layout and assign specific widths through an array of dimensions :…
-
1
votes1
answer656
viewsCut an image every 300 pixels high
I’m developing a clipping report generator where I need to insert images captured from web pages. Most of the time it is necessary to cut them and to distribute them on the PDF pages. How do I…
-
1
votes1
answer39
viewsLists do not load next to model
My model: public class Grupo: ModelBase { public Grupo() { this.Itens = new List<Item>(); } public Grupo(string nome): this() { this.Nome = nome; } public string Nome { get; set; } public…
-
1
votes1
answer2293
viewsCalculation formula for the general check digit
I need to calculate the general checker digit corresponds to the 5th position of the barcode, have the following data. The check digit will be the result of the subtraction: 11 - rest of the…
-
1
votes1
answer388
viewsHow to save scrollbar position?
I would like to get the position of the scroll bar DataGridView, so that after giving a refresh, remain in the same position.
-
1
votes1
answer672
viewsSum selected values from a checkbox
I am developing an application for a beauty salon, I am using the checkbox component on the following screen: However, when selecting a checkbox and then deselecting, the program performs the…
-
1
votes1
answer609
viewsUpdate modal content dynamically
I have a table with up to 10 services listed, and each row has a refresh button. By clicking the refresh button, a modal window opens with the data of this line, as well as a form for change.…
-
1
votes1
answer73
viewsUse variables from a main screen on a second screen
I’m making an application on windows phone, in which I have the main screen ( first screen ), and on this screen is made a calculation, where the result will be displayed on a second screen. My…
-
1
votes1
answer1570
viewsHow to treat multiple Forms on the same page.aspx?
I have a.aspx page that I have several Forms. One of the Forms put runat="server" and you’re like Textbox, I was able to take the form data and insert it into the database. But I wanted to do the…
-
1
votes1
answer118
viewsMake a foreach that does not repeat the same data
I have this foreach, in a table with more than 5000 records. There are only 6 types of business unit. I would like that in the foreach and Ingl, when a type of UN appears, it loads and then does not…
-
1
votes2
answers2031
viewsProblems with types and conversions when filling a page
That is the mistake: An exception of type 'System.InvalidCastException' occurred in App_Web_fjskumyk.dll but was not handled in user code Additional information: Não é possível converter um objeto…
-
1
votes0
answers26
viewsHow to put a break point in Web Service Soap
We have a normal web service, normal say: Not WCF. There are methods that are consumed by the application developed by us. As is giving an error and the message is in WS, I would like to know how I…
-
1
votes0
answers108
viewsWhy does my Asp.net mvc tables have pk duplicated user?
I am using Asp.net Identity for authentication and authorization I have my user class: public class Usuario : IdentityUser<int, ApplicationUserLogin,ApplicationUserRole, ApplicationUserClaim>…
-
1
votes1
answer304
viewsTable for storing expenses and revenues. Cyclical information
I’m creating a C# system for storing individual expenses and revenues. I have doubts about the storage of this type of information, which has frequencies and repetitions. For example: I have a…
-
1
votes1
answer166
viewsDatabase replication in WPF + EF system
I have a sales system in WPF / EF that is in use in different cities, but the database is at headquarters. I am having problems when the city link is very slow, resulting consequently in the slow…
-
1
votes1
answer54
viewsLinq brings result but does not obey Join
We’re getting closer. With this code, it almost worked. Then I switched the Distinct() for DistinctBy() and did not repeat, but still not obeying the IDMotivo. What comes in Linnum does not match…
-
1
votes1
answer196
viewsHow do I put a Count in a string that returns a list
I need to make a count, for the following situation. See the image below, that I have repeated some pharmacies, see their CNPJ(066253003681 and 06626253001476). They are repeated because they are on…
-
1
votes1
answer814
viewsCalling methods in controller class (Asp.net web.api) to work when changing parameter name
I have a question regarding the use of the Asp.net web api with Angularjs that follows below. I have 2 methods in my controller class (Itenscontroller.Cs): public void Put(int id, [FromBody]Item…
-
1
votes1
answer5901
viewsAlert/pop up message in ASP.Net MVC
How to create Alert or pop up to have the same effect as MessageBox in a web application? My code [HttpPost] public ActionResult NovaSolicitacao(Solicitacao pedidoSolicitacao) {…
-
1
votes1
answer781
viewsHow to fill a textbox with a Mysql LIKE?
I am trying to fill in the textbox, when the client is typing the initials of his Name, select goes to the bank and tries to get the information. However, I have no idea how to send I’ll show you my…
-
1
votes1
answer114
viewsUser property, utility and possible Displays
For educational purposes, I was observing the property User class Controller of Asp.Net MVC. I saw a example, very interesting, that a base class for the controllers has been implemented and it owns…
-
1
votes1
answer460
viewsCheck C#threads
I am trying to understand the code below, but without success. From what I’ve researched, GetMaxThreads returns maximum available threads and GetAvailableThreads what is available. In the case of…
-
1
votes1
answer256
viewsIs it possible to use C# + Client Delphi server?
C# has a framework Very good orm, this would help a lot when creating a server webservice between client and database. Delphi has many components that help to develop a commercial automation…
-
1
votes1
answer818
viewsHow to leave my Gridview in the middle of the screen?
How to leave my Gridview c# in the middle of the screen ? already tried to put it in a div and attribute aling = center but it didn’t work out. Someone has a suggestion ? <asp:GridView…
-
1
votes1
answer141
viewsHow to import a cursor. cur in C#
I have a problem loading a cursor file in Windows Forms. Type I put the files in the folder but the program notes that the course file is not valid or is corrupted. But I really need these cursors…
-
1
votes1
answer315
viewsRead JPEG image, convert it to PDF and save to disk - Visual Basic 6
I will create a button, which when clicking it, it reads a JPEG image and can convert it to PDF and save to disk. I would like a tip in source code so I can start this project. Thank you very much.…
-
1
votes1
answer516
viewsTaking table elements with htmlagilitypack
I have this structure rethought over and over again. 1st Table <table> <tbody> <tr> <th>titulo</th> </tr> </tbody> </table> 2nd Table <table>…
-
1
votes1
answer100
viewsLogic for Directory System
I have a directory system in the bank ex table directory: id parentDirID Parent dir means q is a subdirectory. What would the function of "copy" directories look like in the system? move directories…
-
1
votes1
answer168
viewsSCRIPT5017: Syntax error in normal expression
When I run my application through Chrome or Firefox it works perfectly. But by IE 10 at a certain point in the application gives this Javascript error. **JavaScript critical error at line 99, column…
-
1
votes3
answers7968
viewsDelete a line in Datagrid
I’m trying to exclude the line on which you have the focus of a datagrid, I have used the following code: datagrid.Rows.RemoveAt(e.RowIndex); Is returning the following message: Uncommitted new Row…
c#asked 9 years, 6 months ago Fabrício Mendes 843 -
1
votes1
answer221
viewsC# and mysql paging
I have a form and a datagrid, in this form I am using a timer to do a search in mysql that fills the datagrid datasouce, so far everything right. Now I need to limit the amount of research. Ex:…
-
1
votes1
answer114
viewsSelecting Specific Lists
I have the following code to return the libraries of my Sharepoint project: function retornarLista() { collList = website.get_lists(); context.load(collList);//, 'Include(TemplateType==109)'…
-
1
votes1
answer605
viewsHow to catch div through another class
I have a .aspx where I put a div alert. I have a class Message to handle system messages. To treat these messages when instantiating the class, step as parameter to page, in the method step as…
-
1
votes1
answer566
viewsLoad Gridview with variable data
I have 3 variables whose values are changed within a loop for. What I’m trying to do is take these values that are obtained from the variables and load them into a Gridview. Here’s what I tried to…
-
1
votes1
answer44
viewsDifficulty with MVC Code Debugging
One of the problems I have had in the studies is the way the code debugging is done in mvc, I can’t find a logic to solve this. OBS: The sample code option is not formatting the code properly. The…
-
1
votes1
answer1009
viewsHow to make an x64 application connect to a 32bit ODBC driver?
I have an x64 application written in C# with .Net Framework 4 you need to connect to the Microsoft ODBC for Oracle driver. When using this driver with the application in x86 mode, this connection…
-
1
votes0
answers260
viewsCezar cipher in C# - (Error Unable to convert String to Char)
Cezar cipher in C# - (Error Unable to convert String to Char) Hello, I have a college exercise that Voce type a word and it plays the translation according to the displacement informed. If you type…
-
1
votes1
answer458
viewsHow can I be solving these Errors in Unity 5 and adding these components?
using UnityEngine; using System.Collections; public class RandomParticlePoint : MonoBehaviour { [Range(0f, 1f)] public float normalizedTime; void OnValidate() {…