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
votes2
answers3235
viewsHow to call a form and hide the previous one in C#?
I’m in the middle of designing for college and I’m having a hard time. The system has a Form main and when I call the second Form the main remains visible. How do I hide the form main while the…
c#asked 8 years, 11 months ago John Marques 1 -
0
votes2
answers1925
viewsWhat is Serialize and Deserialize for?
My question is what’s the point Serialize and Deserialize in C#. I have an API and am having some problems with this issue so I want to understand better.
-
0
votes1
answer728
viewsUpdate
How do I update a partialview (Asp .net) after I select some parent information, for example: I have a list of bills and a partialview next door to show you the items in that note. When selecting…
-
0
votes1
answer102
viewsProblems with passing values Asp.net C#
I’m having a problem when I’m going to assign the return of query for a variable of the type object she passes as null. I have other identical methods, and they work well, just the one that’s not…
-
0
votes1
answer485
viewsHow to call the printer on a page made in ASP.NET MVC?
I would like to call the printer even if the page is being accessed by mobile. <div class="container droppedHover"> <div class="row"> <div class="span6"> <button class="btn…
-
0
votes1
answer595
viewsButton only work if you pass the ID in the URL in Asp.net MVC
I’m having a problem with my Courses manager application in Asp.net MVC. The scenario is as follows: I have a screen where the "Student" makes his registration in a course. By clicking on the…
-
0
votes1
answer711
viewsWrite information in the browser console via the . NET
I need to demonstrate information on browser the classic console.log Javascript, only that I would like to do this on browser with . Net and not on output Visual Studio because I believe that Azure…
-
0
votes2
answers627
viewsHow to save an attribute to image
I need to save an image and say I have something like: namespace Projeto.Models { public class Usuario { public int UserId { get; set; } public String Nome { get; set; } public ? Foto { get; set; }…
-
0
votes1
answer98
viewsHow to add more than one Datarelation to a Dataset in C#?
Is it possible to add more than one Datarelation to a Dataset? Need three columns in separate tables to be related.
-
0
votes2
answers221
viewsDropdownlist in views Asp.net mvc of the validation error
In a view razor of asp.net mvc I have a dropdownlist with the following code: @Html.DropDownListFor(model => model.Banco, (SelectList) ViewBag.Banco, new {@class = "form-control"}) Even selecting…
-
0
votes2
answers368
viewsFill in inputs from an iframe
Good afternoon. I wonder if it is possible to fill in the iframe inputs through Javascript. <iframe src="http://frame.com" width="100%" height="800" id="frame"></iframe> I know the name…
-
0
votes1
answer1188
viewsSort Gridview ASC
I have this grid, and I would like to sort the columns in ascending order (ASC) how to do? <asp:GridView ID="gridView1" runat="server" AllowPaging="False" AllowSorting="True"…
-
0
votes2
answers160
viewsHow to add Scroll in User Registration?
I have an Asp.Net MVC project that uses Individual User Account and I would like to add a category (Role) for him at the time of his arrest. What I have at the moment is: View: @model…
-
0
votes1
answer47
viewsCategory check in use C#/ASPX
Good morning, I am trying to validate a situation that I explain, for example we added a category "Miscellaneous", and this same category is used in the product "Keys", let’s imagine that we will…
c#asked 9 years, 5 months ago Chirag Geiantilal 151 -
0
votes1
answer96
viewsThe Member with Identity 'Faseprojeto_fase_target' does not exist in the Metadata Collection
I’m making a very strange mistake... I don’t have a clue. This is my class: public class FaseProjeto { public int IdProjeto { get; set; } public int IdFase { get; set; } public virtual Projeto…
-
0
votes1
answer362
viewsThe type or namespace name 'Ajaxcontroltoolkit' could not be found in the global namespace (are you Missing an Assembly Reference?
I have a problem when publishing or compiling the project, the following error appears: The type or namespace name 'Ajaxcontroltoolkit' could not be found in the global namespace (are you Missing an…
-
0
votes0
answers133
viewsSync Sqlserver Express 2014 with Sqlserver Localdb using C#
I’m making an application Windows Forms using C# which will be connected to a bank SqlServer Express 2014 remote, however, I need some features to be available offline due to the poor quality of…
-
0
votes1
answer68
viewsHow to download a simple text file?
As I bass and catch the String contained in an online file on Windows Phone 8.1 SDK?
-
0
votes0
answers27
viewsCreating methods for validation in C #
How can I create a class and method that are universal for Textbox validation for forms in C#. For example, I need to create a method that validates a field called Name in my customer registration…
-
0
votes0
answers44
viewsOnly numbers in Textbox in C# (with Num Lock, WPF Project)
In this command below only the numbers between the quotes (") and the minus (-) of the keyboard work when the user type in a Textbox. I need it to work as well when Num Lock is enabled on the…
-
0
votes2
answers241
viewsPlayerprefs in Unity with Boolean variable?
The PlayerPrefs Has something similar or it itself can use boolean variable. example: PlayerPrefs.GetInt() // e para inteiros
-
0
votes0
answers195
viewsMultiple Models in an Asp.Net MVC#
I’ve had a question for a month. I have 2 tables or Models and I want the view to be manipulated, such as: view your data as they leave the BD and also insert data in the same tables. I saw many…
-
0
votes1
answer197
viewsResize an MDI Form without borders
I’ve found many tips on how to resize a form without borders, all functional and good, but they don’t work when it comes to an MDI Form. Someone has a functional tip on how to resize an MDI Form?…
-
0
votes0
answers66
viewsConnection between Entity Framework and Sybase 12
People trying to make a connection with visual studio 2015, using C# and using the Entity Framework and Sybase 12, I’ve turned to the internet and I can’t find a solution if anyone knows anything…
-
0
votes0
answers35
viewsNomenclature of variables and methods in c#
Hello folks today I noticed something curious in code snippet here at the company Behold : private void Cadastro_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Acao) &&…
-
0
votes1
answer532
viewsResize c# generated bitmap for better visualization
I have a program to generate bar code of the type Interleaved 2 of 5. I got the code from this one website but as it was posted in 2007 I did not get answer to my question. The program generates a…
-
0
votes1
answer58
viewsDoubt with textbox
I’m trying to create a screen of log using a textbox in C#. At certain points in the programme, I would like to insert a line in this textbox. Take the example of: Linha 1> Realizando inserção..…
-
0
votes1
answer263
viewsGetting text within another text
I want to get a List(Of String) of text blocks, but there is a problem: { --isso é um bloco; echo "Aqui tem um } no meio";} and would like to get that way: --isso é um bloco; echo "Aqui tem um } no…
-
0
votes3
answers124
viewsTake the name textview in repetition loop
How can I get the textbox inside a For: I have a For that traverses 20 times and I have 20 textbox on my screen, I wonder how I could get all the textbox that contains on name the word "Publishing"…
-
0
votes0
answers930
viewsSending files to google drive with . net
How to send a file to google drive in c#? I have an Intptr of a file, do I have to convert to bytes and upload? What would be the sending? I took a code gave m tutorial, however I did not understand…
-
0
votes1
answer139
viewsController get checkbox list from a view
I have a Partialview where I upload a list of my object and put a checkbox so the user can mark which list item he wants to save, so I don’t know how the controller can "know" which check in is…
-
0
votes1
answer193
viewsSystem.Threading.Thread does not exist?
I’m trying to learn how to use multithreading in C#, but all tutorials ask me to use the System.Threading.Thread class, but it seems that in my Visual Studio this class does not exist! A print for…
-
0
votes0
answers745
viewsHow to add row and columns dynamically in a Tablelayoutpring C#?
I have a TableLayoutPanel displayed in grid form on the screen that already has an X amount of rows and columns, and also contains components in its cells. I allow, through a screen, the user to…
-
0
votes1
answer563
viewsHow to create a SLN and CSPROJ file that opens the following file types
How I create a SLN file that opens files .csproj and how I create the file .csproj too? Hence the csproj will open the files .cs and .dll? Can you help me?…
c#asked 8 years, 9 months ago user39571 -
0
votes2
answers613
viewsThe referenced component "System.Core" was not found?
The referenced component "System.Core" was not found? I’m with this error how can I fix? http://prntscr.com/a37caw
c#asked 8 years, 9 months ago user39571 -
0
votes2
answers1590
viewsGNRE Webservice Integration with C#
Someone can help me or has been through this trouble? I am doing a project to integrate my software with the GNRE webservice to send the guides in an automated way. In the integration with…
-
0
votes0
answers62
viewsError: The type or namespace name 'Logic' does not exist in the namespace 'Game.Logic.AI.Game'
Error 12 The type or namespace name 'Logic' does not exist in the namespace 'Game.Logic.AI.Game' (are you Missing an Assembly Reference?) How can I solve it? I already have a project called…
c#asked 8 years, 9 months ago user39571 -
0
votes1
answer48
viewsHow to get a Type from a string
For example, I want a string containing the information "System.Windows.Forms.Button" return a button object New Button(), would that be possible? Note: Is tagged C# as it is easy to translate from…
-
0
votes1
answer536
viewsHow to deserialize attributes of the elements of an XML with C#?
Well, I asked that question once, but I didn’t get an answer, so I’m gonna ask you again. I tried some methods I saw there that said it worked in other questions, but none of them. I need to read…
-
0
votes2
answers381
viewsASP.NET MVC with Formsauthentication
I have an Asp.net MVC application with Formsauthentication, but the need arose to release a page for the visitor of the site or a page is released for everyone and the rest of the controllers falls…
-
0
votes0
answers149
viewsMVC + EF application with N-Layers
I am working on an MVC project with EF 6, and I am having a very curious problem, in some Viewmodel, the object that comes from my Dbcontext does not seem to persist and I get the generic message…
-
0
votes1
answer279
viewsHow do I check the browser type, version and if support Javascript?
I need to identify the browser, the browser version and if it is enabled to run javascript. In previous versions of Asp.Net I checked Global.asax using the command Request.Browser.JavaScriptbut this…
-
0
votes1
answer146
viewsC# - Mouseleave Event does not work under a different label
I created two Labels with different names and created two methods for each Label responsible for making an event Hover kind of similar in CSS (was just a comparison). //Evento responsável por fechar…
-
0
votes2
answers1180
viewsLimit file size
I created a file import method. I would like to know how limit the size from the uploaded file to the server.
-
0
votes3
answers968
viewsC# Display time in textbox control
I need to show only the local time in a control TextBox. In the following format: hh:mm:ss How could I do that in C#?
-
0
votes1
answer156
viewsPicturebox+Image
I have a Picturebox1 with an image (cameras-Hdv-Merlin-courses.png) example: private void pictureBox1_Click(object sender, EventArgs e) { } When you hover your mouse over it I’d like it to have a…
-
0
votes1
answer1206
viewsWhy is the type=Submit button not submitting?
I am creating a form within the modal, when I try to submit it, not submit it. My view: @model GerenciadorDeAtividades.Dominio.AtividadeDominio @{ Layout = null; ViewBag.Title = "Alterar Status da…
-
0
votes1
answer3261
viewsGrab the coordinates of the mouse position by clicking
I have to trace a line with starting point and ending point,I can do this line if I provide these coordinates by keyboard, but I want to do this by mouse click,the first would be the starting point…
-
0
votes1
answer35
viewsClickonce does not receive last update
I have an application in Winforms, posted on my app server. When I try to install the latest ex version. 1.1 by Clickonce, the customer machine does the installation of version 1.0, which in this…
-
0
votes1
answer70
viewsHow to put 0x0D 0x0A at the end of a txt file
I have the end of the code of my txt file below and according to the recipe manual, asks me to put the characters 0x0D 0x0A at the end of the record. How could I do that? ATT01 =…