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
answer183
viewsGridview Asp NET disappears Sort after Click to perform Update
I have my Gridview developed manually, the problem and that when I click to carry out the update my gridview ceases to be orderly and returns to its normal state. I intended that this would not…
-
1
votes1
answer401
viewsStandard Asp.net MVC authentication
I’m starting studies on Asp.net MVC, and wanted to know where the visual studio creates the database and tables when choosing the standard MVC project. It seems that it already creates all the…
-
1
votes1
answer127
viewsConvert Windows application to Windows Phone - C# (Httpwebresponse and Httpwebrequest)
I have a C# class for Windows that works normally, but I’d like it to work on Windows Phone. The idea is to use HTTP methods get and post from a web page that has CAPTCHA. I will show the captcha to…
-
1
votes2
answers301
viewsHow to return an int in a Decimal property
I have an SQL string (made by another programmer a long time ago, so I can’t change it) that returns something like this: If it has value in column, returns value, otherwise returns 0 (I would post…
-
1
votes1
answer186
viewsHow do I get a contact list by code on Windows Phone 8.1?
How to grab a Windows Phone’s contact list from an app and display it on a ListBox?
-
1
votes0
answers205
viewsHow to use Nhibernate cache with C#
Guys, how can I use cache in Nhibernate with C#? What is the best way to implement? And what considerations should I take?
-
1
votes1
answer45
viewsHow to compress my Resources files
I’m developing a Battleship game (I’m still a beginner in programming) and I’m adding some songs and images. My problem is that this is adding too much to the project/game size and hinders. Is there…
-
1
votes1
answer560
viewsResponse.Write/Flush hangs after many calls
DISCLAIMER: I posted the same question in Stackoverflow in English, I will carry the valid answer from here to there or from there to here if necessary, but I know that not all users here access…
-
1
votes2
answers6198
viewsError Could not load file or Assembly Microsoft.Web.Infrastructure
I created a site in c#, the same runs on my machine, but when I publish and update on the server via FTP(Filezilla) this message appears, someone can give me a tip on how to solve ? Could not load…
-
1
votes2
answers2761
viewsDo not display null value (01/01/0001) of a Datetime in a Datagridview
My DataGridView has some fields DateTime worthwhile null (01/01/0001). How do I do not display these values, leaving the field blank? Currently: How I’d like you to stay: I’m using WindowsForm, C#…
-
1
votes1
answer690
viewsSorting in Crystal Report with sub reports
I have in my report 2 subs reports but I want to sort by the field "Student" of the Main Report but I’m not succeeding, even though I already bringing from the query it ordered with I would like. I…
-
1
votes2
answers1314
viewsHow to change the color of a Datagrid line in C#?
When a Datagrid row was selected and then a button was clicked, the color of the selected row changed, I use Visual Studio 2013 and it is Wpf application.
-
1
votes1
answer335
viewsHow to paint a cell from a Datagrid?
See the code in How to change the color of a Datagrid line in C#? He’s painting the whole line, as far as that’s concerned, what happens and that at the time I give one scroll the painted line is…
-
1
votes1
answer2717
viewsCheck File Creation Date and Delete
I created a Backup application, it saves the files in zip format DD-MM-YYY - 00-00-00.zip, but would like to know how I would do to check creation date for deletion, because the name of the files…
-
1
votes1
answer545
viewsAre there online programming learning environments with hands-on exercises and challenges for C#?
There are some sites, such as URI Online Judge, that allow programmers to practice programming and share knowledge through specific exercises and logical and mathematical challenges. But some are…
-
1
votes1
answer344
viewsTwo models and a controller
Following the reasoning of that other question of mine, where I create two models for manipulations, as if I could use a controller to make the manipulations in the tables ? My intention in doing…
-
1
votes2
answers1537
viewsjquery method does not pass parameters to controller
Jquery does not pass parameters to controller. Empty values. Jquery: function GravaEvento() { var str = ""; var parametros = jQuery.parseJSON('{ "DE_Cnpj": "' + $("#txtCnpj").val() + '" ,…
-
1
votes1
answer130
viewsHow to receive unique data in Asp net mvc
I have the following model called Conta: public int Codigo { get; set; } public string Nome { get; set; } public int Prazo { get; set; } assuming I want to select (without using lambda) and bring…
-
1
votes1
answer3634
viewsWhere to place the connection string with the database?
I have the form: Already created the database and table for registration, I am using wampserver and Mysql Workbench. My question is where to place the connection string: MySqlConnection conn = new…
-
1
votes2
answers244
viewsJavascript injection in Internet Explorer, returns null
I am developing an application that performs automation in internet explorer, I am using the Shdocvw to do this. My problem is I can’t get the return of an injection of Javascript public static void…
-
1
votes2
answers1433
viewsAutomatization of the execution of a file . exe
I need an application to run in the background, in the system tray, 3 times a day, at 08:00, 12:00 and 16:00 it runs a file. exe.
-
1
votes1
answer108
viewsHow to make a pager without a gridview?
I have a system in Asp net mvc, in one of the screens is displayed several items, the select to catch them from the bank is: Select top 20 from Produtos As demonstrated, it displays only the first…
-
1
votes1
answer1885
viewsIs it possible to change the template/graphical interface of a form in Windows Forms?
I’ve been researching about and the results that I was able to just turn to WPF instead of using Winform, but I still have doubts and I believe it is possible to change the template of the software…
-
1
votes1
answer126
viewsHow to view progress in Taskbar
Hello guys I recently saw on a forum that is yes possible to show progress in Taskbar (compatible with Windows 7) I have the following code: using System; using System.Runtime.InteropServices;…
-
1
votes2
answers211
viewsGetting Foreign Key value - Object Reference not set to an instance of an Object
Using Code First - MVC 4 - EF6 I have the following Model: [Table("usuario")] public class Usuario { [Key] [Column("UsuarioId")] public int UsuarioId { get; set; } public string Nome { get; set; } }…
-
1
votes2
answers1224
viewsHow to fix this issue with Datagridview Check Box Cell?
I’m having a problem with the Datagridview checkbox Cell: Click on checkbox, and it marks the Checkbox and updates a value field. I click again, and he does the opposite. Everything works normally,…
-
1
votes2
answers4303
viewsHow to remove a mapping in visual studio at tfs
How do I remove a mapping done by VS 2010 Ultimate in tfs? I need to do this, to map correctly as it is wrong.
-
1
votes1
answer2703
views -
1
votes0
answers156
viewsCount people in Kinect - Skeleton or Depthstream
How can I count people with Kinect? I already installed the SDK, as I have version 1 of Kinect I’m with SDK 1.8, I took the examples of the Kinect Toolkit itself but even digging through the code of…
-
1
votes2
answers180
viewsHow to produce JSON in the format that Flot expects?
Doubt on how to serialize to return this JSON. I’m using the Flot library (http://www.flotcharts.org/) to display a chart. I can generate the charts. In my view I’m wearing it like this : $.ajax({…
-
1
votes1
answer91
viewsDisplay chosen Select value
I have this dropdownlist: <select> <option value="0">Selecione os capitulos</option> @foreach (var item in ViewBag.Capitulos) { <option…
-
1
votes1
answer2554
viewsHow to change column header for a gridview
How do I get a name I want to the column header of a gridview that is dynamically created in C# but not in ASP.NET please
-
1
votes1
answer625
viewsShow database image for each usercontrol
Usercontrol1 private string lastName; private string nnovo; public string LastName { get { return lastName; } set { lastName = value; label2.Text = value; } } public string Nnovo { get { return…
-
1
votes1
answer58
viewsProblem with debugging
I am developing a project that has a complete logon system with Roles, User and Goups, but when renamed the project asks to Attach Process instead of DEBUG, how to resolve this?…
-
1
votes4
answers267
viewsWindows Phone, error saving text (Isolatedstorage)
I’m trying to run an app (Windows Phone 8.1) that, for now, will only save a text in a txt file in the phone’s memory and should also read the txt file. When trying to save the text, Visual Studio…
-
1
votes1
answer161
viewsHow to know if the client is already open on another computer?
I’m building a system that can and will open on possibly two to seven computers. There is concern in the following case: PC1 opened the João client file and began editing. PC4 opened the João…
-
1
votes1
answer197
viewsUsing Gfix in a C#
I am developing an application in C# and I need to pass the Gfix in a Firebird database, I thought to run a prompt window and pass the commands of Gfix to her, but I am not succeeding. Also I need…
-
1
votes1
answer124
viewsWhat’s the best way to make a mini-decoder?
Hello I am new in programming and I would like to know the most efficient way to make a "mini-decoder". I got the idea from my teacher who gave a duty that we had to take the number and turn it into…
c#asked 10 years, 2 months ago mrlucasrib 641 -
1
votes2
answers1393
viewsAlternative to Session
I am using Session to store the company object the user is logged in to. Use also to make filters, for it view only what is from the logged-in company. However, I am with the following problems: 1 -…
-
1
votes3
answers760
viewsHow to close mysql connections in C#
When executing the code below: DataSet bdDataSet; MySqlConnection conexao; public void inserir() { bdDataSet = new DataSet(); conexao = new MySqlConnection("Server=localhost; Database=teste; Uid=;…
-
1
votes2
answers231
viewsEffect (animation) on clicking on Windows Phone apps
I’m creating an app for Windows Phone 8.1, using the language C#. But my application is with "static" items and when clicking, it does not create that bending effect showing that you have selected…
-
1
votes1
answer502
viewsWindows Immediate Window is gone
Window Immediacy Windows disappeared and I can’t restore it anymore. The condition does not appear in the Edit Menu of Visual Studio 2010.
-
1
votes1
answer340
viewsError in foreach
Good evening guys. I have a project for a school that registers the student’s data and their occurrences. going straight to my problem: What happens is that I have a page to show the new occurrences…
-
1
votes2
answers665
viewsDatagridview with columns of different tables of a Dataset
I imported 16 tables from mine MSSQL in a DataSet and made all the necessary relationships. I need to generate a report on a DataGridView (or other tool) with columns specific to several tables. How…
-
1
votes3
answers3234
viewsMake an UPDATE with the value of another database
My bank is like this: cd_endereco | ds_endereco 1 | Rua joão e maria 2 | Rua Manuel Silva And in the other database, I have the same columns, while cd_cliente. I want to pass the values of this…
-
1
votes4
answers642
viewsPrevent user from saving information in the bank
Hello I’m wearing Windows FORM C# Visual Studio, how do I prevent the user to save the information in the bank without filling in the required fields, that is to say (NOT NUL) from the bank all this…
c#asked 10 years, 2 months ago Fabrício Mendes 843 -
1
votes2
answers351
viewsBinding in text field
In my project I have some tables between them one of occurrences and one of users, where a relationship between them of several occurrences for a user. What happens is that when registering an…
-
1
votes1
answer913
viewsHow to translate Strings from a . resx file?
I am creating a small application in C# and would like to translate it into English, because I intend to publish it and most of the target audience speaks English. Searching, I discovered that I can…
c#asked 10 years, 2 months ago Renan Lazarotto 1,025 -
1
votes1
answer157
viewsRemove Xnamespace in Xelement c#
I am in need of removing the Xnamespace that enters as default on an rss return. Follow the code below: static void Main(string[] args) { XNamespace ns = "http://search.yahoo.com/mrss"; var item =…
-
1
votes2
answers243
viewsHow to run a flash file(.swf) on an ASP.NET page?
I have an ASP.NET Webforms application and want to know how to run a flash file(.swf), on a div of an ASP.NET page.