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
answer234
viewsDisable button when selecting item in Datagrid
I have a datagrid with records and an edit button. At the moment I am doing the following: the user selects the Datagrid item and clicks the Edit button, to then be performed the verification…
-
0
votes1
answer172
viewsError while exporting Datagridview to Datatable
I am trying to generate an Excel spreadsheet based on a Datatable, all data are in the given format, but the Date format is in the American standard ("MM/dd/YYYY"). Follow the function code:…
-
0
votes1
answer67
viewsXtrareport - View report but don’t print
I’m using the report builder XtraReport, and using ReportPrintTool to view and then print. However, it was necessary, just visualize, blocking the print. It would be possible? Preview button:…
-
0
votes1
answer88
viewsApplication Service Visual Studio 2015
I created a service app in Visual Studio 2015 to get started the service needed to create an installer. I created a Visual Studio Installer project, filled in the parameters and everything worked.…
-
0
votes2
answers231
viewsMultidimensional array in C# equal PHP?
First time here on this forum, I usually use stack overflow but come on. My question refers to the array in C#: I’m more familiar with PHP and in php we can name our array indexes for example:…
-
0
votes2
answers101
viewsLike warping a button?
How do I deform a button, using the Paint button event to have the shape of the key Enter or even the shape of a circle?
-
0
votes1
answer42
viewsPopulating Gridview with no selected record
I’m populating a Gridview and he’s populating with the first record ever selected. var lstUsurios = new V_ENTIDADE_X_PWDNegocio().Listar(); gdvAcesso.DataSource = lstUsurios; gdvAcesso.DataBind();…
-
0
votes0
answers285
viewsSorting Datatable column by a field of type Datetime
I have the following field in my model: [Required] [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)] public DateTime? DataCadastro { get; set; } I use Displayformat…
-
0
votes0
answers337
viewsChange permission to modify files
I am creating a Windows Forms application that will fetch an Excel spreadsheet and update some DBF files from a legacy system, but when I run the system I cannot update the DBF files due to the…
-
0
votes1
answer113
viewsFluent Api entering undesirable records
I have the following classes: Estado.Cs public class Estado { public Int32 EstadoId { get; set; } public Int32 CodigoEstado { get; set; } public String Sigla { get; set; } public String Nome { get;…
-
0
votes0
answers206
viewsError compiling App with Xamarin
I’m having some problems compiling my project on Xamarin no VS2015. Error java.lang.Unsupportedclassversionerror: com/android/dx/command/Main : Unsupported major.minor version 52.0 Navegacaointent…
-
0
votes1
answer685
viewsHow to read tables from a pdf?
I am trying to read tables from a certain pdf file, using the iTextSharp, I found many answers that indicate using the LocationTextExtractionStrategy, only that my table may vary position along PDF…
-
0
votes2
answers228
views -
0
votes1
answer71
viewsIterate Activex object collection with latebound Interop in c# (Command)
I need to iterate collections of COM+/Activex objects with latebound in C#. Right now my need is to iterate the collection of Activex objects COMAdmin.COMAdminCatalogCollection, return of the method…
-
0
votes1
answer106
viewsSend multiple variables at once socket
Using the method Socket.Send would have some way to send a package with for example an integer and a string at once? I saw such a Packet which apparently was all I needed, because I can turn it into…
-
0
votes1
answer166
viewsError ordering Gridview with empty row column
There is an error here that I am not knowing how to get around, as my program reads a site, sometimes the site can escape from the pattern and end up leaving some empty things, so when my Gridview…
-
0
votes1
answer3075
viewsOpen Modal Bootstrap from code-Behind
I need to open a modal when the password or user are incorrect, it will be on Else .. but does not open the modal protected void bntLogar_Click(object sender, EventArgs e) { Registrar criptografia =…
-
0
votes1
answer93
viewsStackoverflow in System.Windows.Forms.dll
Hello. I am developing a C# desktop application that performs a Serial Port routine (Writing, Reading, Capturing Information, Displaying this information). However, there are times when a Stack…
-
0
votes1
answer1371
viewscheckbox + Model + Controller. How to pick up selected rows?
I’m sent to my model typed for a view and loaded the data into a table where I enclose a checkbox for each line. The user will select the items that matter to be later saved in the database. My…
-
0
votes1
answer96
viewsSet Popup Size - Gridlookupedit
Someone would know how to decrease the popup, presented by the control GridLookUpEdit devexpress?…
-
0
votes0
answers62
viewsProblems with Objectstatemanager when updating a Model
I’m having trouble updating a model, the code below is working correctly when I give GET in a context model edits on the screen (View) and I give a Submit everything ok but when I have a data grid…
-
0
votes1
answer224
viewsLogin from an external system using ASP.NET MVC
I need to implement a form of my system (written in ASP.NET MVC) to log in from an external system to which I do not have the source code. This external system uses the same users of my system. How…
-
0
votes1
answer946
viewsReading headers in Webapi
I have a code that posts to a url and adds some parameters to the request header HttpWebRequest req = WebRequest.Create(new Uri(url)) as HttpWebRequest; req.Method = "POST"; req.ContentType =…
-
0
votes2
answers531
viewshow to call stored Procedure with Linq
Good morning, everyone. I have a stored procedure in the sql server, and I would like to call you on my application c#, via linq. Since now I appreciate any help…
-
0
votes1
answer141
viewsModal in the controller
I am working on a page that has an Order model and there is a button that when pressed opens a product modal, with a table with all products. As I click on a line a product is added to the…
-
0
votes0
answers148
viewsReload all css within a div
Gentlemen, I will try to explain my problem, I hope to be clear. I’m using C# MVC5 in my app. Today I have a page and in it a grid. In this grid there is a button to edit the record. By clicking…
-
0
votes1
answer142
viewsHiperlink + Eval + navigateURL
I would like to create a link on the listview line to navigate to a url when clicked. The "city" field has to complete the url so that the direction is done correctly. <%#Eval("cidade")%>…
-
0
votes1
answer38
viewsLack of Assembly Reference C#
I have an error of lack of use of Directive or a Assembly Reference aimed atKeyCodand Modifiers Can anyone tell me what it would be and how I can carry it ? private void lblAutoCod_MouseClick(object…
-
0
votes1
answer49
viewsControl with Htmlcontrol or Htmlgenericcontrol inside Gridview
I have an html tag inside a gridview: <asp:GridView ID="GridView1" runat="server" ...etc..etc <i class="fa fa-cloud-upload fa-lg cinza" runat="server" id="icon_Nuvem"></i> ... When…
-
0
votes1
answer672
viewsSetting Textbox for Currency
I’m trying to set up a TextBox in a Windowsform to display the value of the field in the currency format. I can only do that in the Enter event of the field with the following code: private void…
-
0
votes1
answer124
viewsSend array to controller via Ajax.Beginform and update Partialview
Good morning guys, I have a search screen where I list several values according to the user filter. I use Ajax.Beginform to update the table, but now I need to send an array, the user will be able…
-
0
votes2
answers120
viewsHow to move form on screen programmatically with animated effect?
How can I make my form go from location 0.0 to location 100.100 on the screen without user interaction, ie through programming, this movement needs to be animated, ie can not disappear from one…
-
0
votes1
answer504
viewsListview c# passing value to the next form
I rode a form in c# and this form is responsible for showing all data from my table on Bd and put this data into a listview, can thus select an item from the listview and rode another form where he…
-
0
votes1
answer691
viewsBundleconfig does not load all CSS files
I am trying to load the CSS files jquery-ui.css and jquery-ui.theme.css creating a Bundles, but Bundle insists on only loading the standard CSS of ASP.NET MVC which css site.. To work, I always have…
-
0
votes1
answer82
viewsDownload a pdf from a web application to a desktop application, in C#
I have to do a job for the college using C#, with Visual Studio, where a user accesses a web application, uploads a file, and sends it to a remote desktop machine and saves it in a specific folder.…
-
0
votes1
answer61
viewsHow to resize an image using UWP?
I have that code: var file = await ImageChooser.GetSelectedImageAsStorageFile(); var sasUri = await Vm.GetBlobSasUri(file.Name); var blob = await file.UploadToBlob(sasUri); await…
-
0
votes1
answer269
viewsLogin to index screen
Talk to the guys, all right? So I’m developing an application in ASP.NET MVC and I have a login screen, but I include in the login navbar, where the index the user could enter his email and password…
-
0
votes1
answer157
viewsUsing Multiple Schemas with Entity Framework 6
I am starting to work with the Entity Framework, and I need some example of how I can define for my tables the Schema’s that each one is contained. My database was created as in the example:…
-
0
votes1
answer8384
viewsCalculate age from date of birth
Create a program where the user can enter his name and date of birth. Then click on a button that should display a message containing your age.
-
0
votes2
answers1160
viewsHow to know if a process is running in windows using c# or . bat?
I am wanting to create an application that runs in the background and that monitors some service to know if it is in execution or not someone could give me a light?
-
0
votes1
answer121
viewsHow to pass variables from C# MVC 4 to SASS SCSS?
I need to change my CSS files dynamically by pulling some data ,like colors, from the database. I chose to use SASS in the application, but I can import an application variable in MVC 4 to my SCSS…
-
0
votes0
answers85
viewsThe underlying Connection was closed / Httpwebrequest
I use this request to get the return of a page, but my connection is rejected with this message The underlying connection was closed: A connection that was expected to be kept alive was closed by…
-
0
votes1
answer220
viewsConcurrent Use in Asp.net Applications
I’m starting to study programming in Asp.net mvc (and trying to follow the DDD) and, with this, I came up with a question regarding the concurrent use: Asp.net already performs this control for me…
-
0
votes3
answers210
views -
0
votes1
answer771
viewsKill external process when close form
I created a form that runs an external program when I click on a program click button, but when I close the form I wanted it to give a Kill process in the task manager. However he says he has access…
-
0
votes2
answers1230
viewsBack button on Xamarin Cross Platform
How to make a function for when to click "Back" on Android in Xamarin, the app goes back to the previous screen ?
-
0
votes1
answer93
viewsPass data from a Datagridview to Textboxes in C#
Hi, I’m having a problem and I’ve even asked a similar question before, but now I’m being more specific. I have two Forms, one form has a Datagridview connected to a Database and the other form will…
-
0
votes1
answer1642
viewsMake a game in C# from scratch
I’m learning C#, and I already have enough knowledge(I think) to make a simple 2D game. But I don’t want to use NO engine. So where do I start?
c#asked 8 years, 1 month ago user30226 -
0
votes0
answers64
viewsRow.Cell is coming empty
I made a button to inactivate several people in one gridview, the first time the right process, when updating the page, the Row.Cell always comes empty, does not recognize the selected to…
-
0
votes0
answers117
viewsASP.NET Identity: Authentication Error
I changed the PK of the Identity tables from string to Int, however when logging in Identity does not authenticate, log in normally but do not have access to any of the controllers that requires…