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
answer1270
viewsUpdate an ASP.Net web page
How do I update an ASP.Net web page? I have a page that has two GridView and I need this page updated every 5 minutes. Mine GridView are like this: <div class="GridMain"> <asp:GridView…
-
0
votes2
answers669
viewsInfinite Loop in Event
I have a class called Dta that contains the following code: public event Dta._TimeOutEventHandler _TimeOut; public delegate void _TimeOutEventHandler(Dta dta); public void CheckTimeOut() { if…
-
0
votes1
answer1032
viewsAction redirect another Action using Partialviewresult
public PartialViewResult Index(string quantidadeRegistro) { int qtd; int.TryParse(quantidadeRegistro, out qtd); var bdPedido = PedidosAplicacaoConstrutor.PedidosAplicacaoEF(); var bdCliente =…
-
0
votes0
answers383
viewsMysql Connector MVC
I installed Mysql Connector and local I was successful, I was able to make the connection and even do my Migration. However, after giving Publish in my project and go up in FTP, I am encountering…
-
0
votes1
answer309
viewsLeft Join on the Linq is giving error in more than two tables
I did that last breath: var resultado = ( from pdv in db.T_PDV join tarefa in db.T_TarefaParceiro on pdv.CNPJ equals (tarefa.CNPJ) into _trf from g1 in _trf.DefaultIfEmpty() join parceiro in…
-
0
votes1
answer166
viewsSql CE 3.5: Data generation probelma
When trying to generate Datacontext to a Windowsphone 8.1 project, through the SQL Server Compact Toolbox interface: -Generate Code (EF/LINQ to SQL/Syncfx) >> Add Windows Phone Datacontext to…
-
0
votes1
answer817
viewsDifficulty placing checkbox in treeview with or without bootstrap
This is my treeview: @*Daqui para baixo, tudo se relaciona com a treeview*@ <div class="well" style="width:100%; padding: 8px 0;"> <div style="overflow-y: scroll; overflow-x: hidden;…
-
0
votes1
answer194
viewsDate is coming in wrong format
In a jquery function, I get a date in my View. It turns out that the date is coming like this: /Date(1402369200000)/ I know I need to do a cast or something, but I don’t know how to do it. Can…
-
0
votes2
answers558
viewsJquery does not mount date correctly
I did that and MSG is: Invalid Date. I think it’s because everything has turned into a string. How do I bring only the numerical part on the date? In fact, I say this because I cannot return a date…
-
0
votes1
answer760
viewsJavascript error - Uncaught Typeerror - Unable to resolve
Give me the following error: Uncaught Typeerror: Undefined is not a Function. I still can’t fix it. I’ve already changed jquery versions and nothing. I looked for quote errors, semicolon and still…
-
0
votes3
answers647
viewsDynamically load from the bank and mount a treeview in cshtml I’m not getting
is as follows. I am not getting satisfactory results in assembling a tree using checkbox as in a treeview. Well, when I put the fixed data works very well. But when I bring the BD data, that’s where…
-
0
votes2
answers4814
viewsForeach within a cshtml(view) from a controller
I made a code using Linq and jQuery. Turns out you’re giving me a problem I can’t solve, which is creating a Treeview dynamically. Then I had another idea. To do the foreach right in the View…
-
0
votes1
answer258
viewsHow to create an XML tree with attributes using LINQ
Good night! How do I create an XML document with attributes using LINQ to XML EX: <class name="Pessoa" tabela="pessoa"> <property name="id" column="id" pk="true"/> <property…
c#asked 10 years, 2 months ago Emilio Julio Zimba 1 -
0
votes1
answer894
viewsChange Tabpage title color
Does anyone know how to change the color of the title Tabpage in C#? Not full page text color, only page title color (from Tab).
-
0
votes2
answers729
viewsHow to fill datagrid in a form with fields in another form C#?
I’m making a loyalty system, and I wanted to use two forms for customers, Form1 with the datagridview and a button register and the other form2 with the data fields to be filled in, that form2 would…
-
0
votes1
answer110
viewsAnd I have a question regarding select in sqlite bank in WP
I started using the Sqlite database on Windows Phone. And I have a question about select in Sqlite bank. /* List items = null; items = App.db.Query(“select Nome from Usuario”); ListBox.ItemsSource =…
-
0
votes2
answers692
viewsI cannot call Javascript function in textbox
I have the following java script function to format my date fields: function MascaraData(data){ if(mascaraInteiro(data)==false){ event.returnValue = false; } return formataCampo(data, '00/00/0000',…
-
0
votes1
answer130
viewsConverting split expression to C++ to C#
I have the following condition in C++ and would like to move to C#. The problem I’m having is with the function div error: The name 'div' does not exist in the Current context if (quant > 0) {…
-
0
votes1
answer228
viewsHow do I finish my WPF application and boot it again?
I have in my application a database configuration screen, in which once configured I have to close the system and then open again to take effect the changes made. How can I do this in an automatic…
-
0
votes1
answer838
viewsHow to list sql server databases in a combobox
How to list SQL Server databases in a C application combobox#
-
0
votes1
answer879
viewsChange column color (Chart) with values above the limit
I’m making a report for winforms using the Viewer REPORT, in this report I added a column chart. What I need to do is that before loading the report the user can choose what value is good for it,…
-
0
votes1
answer404
viewsWorking with Entity Framework, Multithreading and SQL Server in C#
I’m using the Entity Framework and Multithreading on a project C# and I am going through problems of connection with the SQL Server. Well, I wanted to improve the speed of some data searches for a…
c# sql-server entity-framework linq multithreadingasked 10 years, 1 month ago Vinicius Botelho Bizarri 1 -
0
votes2
answers1041
viewsFailed to convert nvarchar'VINET' value to int data type
I have that mistake: Falha ao converter o nvarchar valor 'VINET' para o tipo de dados int. Down with my code: private void button1_Click(object sender, EventArgs e) { try { SqlConnection…
-
0
votes1
answer98
viewsC# application does not load XML file when putting the application to start with Windows
I have an application that reads an XML file when opening, done this manually works, but if you put the application to start with windows the same does not read the file.
-
0
votes1
answer234
viewsC# Mysql Connection thread-safe
I have a server that receives hundreds of asynchronous connections and I need to implement Mysql access from different threads. In fact, how I use the Async Socket Begin/End standard. Net, there is…
-
0
votes4
answers7370
viewsValidate content from Textbox
I have the fields TextBox, for example: txtValorCompra would have to be typed by the user 98,90 and it can’t be letters txtNumero integer input nome only letters. You’d be able to do that on the…
-
0
votes2
answers3899
viewsLock Printscreen function
I know the question is controversial, but I want to know if it really has to block the function print screen altogether. In Windows Forms you can delete the clipboard with Clipboard.clear, but in…
-
0
votes1
answer525
viewsWhat is the difference between the types of WCF projects?
What are the differences between the various types of WCF design: WCF Service Library; WCF Service Application; WCF Workflow Service Application; Syndication Service Library;…
-
0
votes1
answer133
viewsSelect and move to graphical interface
First the right model: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MetaData { public class Fornecedor { public int…
-
0
votes1
answer259
viewsRepeat div with foreach?
I have a list of registered users displays the most important data such as name and email. I created a div to display this data. However, I do not want to display everything in the same div, I would…
-
0
votes1
answer573
viewsHow to order a Listbox
I have a listbox and two buttons on the side, one to move the selected item up and the other down. However, the list is loaded by DataSource from a bank table, I wanted to sort the position of the…
c#asked 10 years ago Bruno Ramalho -
0
votes2
answers1301
viewsDoubt about Request.Form
What is Request.Form? How do I interpret these lines? if (Request.Form["chkTornarObrigatorio"] != null) ventRegPendencia.IcDocObrigatorio = int.Parse(Request.Form["chkTornarObrigatorio"]);…
-
0
votes1
answer838
viewsRadiobutton returning selected status only
Follows the code: <asp:RadioButtonList ID="rdlCpfCnpjAvalista" CssClass="cPFCNPJRadioButtonList" runat="server" RepeatDirection="Horizontal" AutoPostBack="false"> <asp:ListItem Text="CPF"…
-
0
votes1
answer216
viewsHow to know if a function has been called by another form?
How to know if a function has been called by another form? For example: In my Form 1, I have a method that calls another form: private void btnFormulario2_Click(object sender, EventArgs e) {…
-
0
votes1
answer34
viewsDifference between repeater_itemdatabound and repeater_itemcommand
What is the applicability and difference between repeater_itemdatabound and repeater_itemcommand in a Peater?
-
0
votes1
answer58
viewsHow do I use Mysql in a common form?
I’m having trouble using a Mysql database I have on a host (Bluehost) in a C#application, I would like to view the tables in an application but I can’t connect to DB , I already installed the Nector…
-
0
votes1
answer93
viewsAssociation in Devexpress XPO models
I have a model for Municipio. This model can be referenced by several other models (Customer, Supplier, Carrier, Seller...). Each of these models has an association N:1 for Municipio, +/- so: public…
-
0
votes1
answer159
viewsString conversion problem in Timespan
In the system I’m developing a user sends me a TimeSpan via Post, but when I catch the String that should be the TimeSpan and apply a TimeSpan.Parse he gives the error: "Could not parse Timespan…
-
0
votes1
answer2527
viewsHow to show database data in Textboxes?
Hello! My scenario is as follows: I am developing a web application in C# ASP.NET, and I am having some difficulties to bring the database data (via LINQ to SQL) to the page controls. Below one of…
-
0
votes2
answers1834
viewsUpdating object value of a Form by a thread
I need 2 Abels of my form to be updated every 1 second, so I threaded it myself load of Form: Thread threadUpdate = new Thread(new ThreadStart(UpdateState)); threadUpdate.Start(); And my method…
-
0
votes2
answers1013
viewsC# MVC EF5 delete relationships
Hello, I am developing an application using C# MVC and EF5 and I have the following problem: I have a customer group management screen, in this group I can insert and remove customers, I use a…
-
0
votes0
answers666
viewsBundleconfig - No files found on the server
I’m using Kendo UI on a project MVC 4, I made the settings in Budleconfig: bundles.Add(new ScriptBundle("~/bundles/kendo") .Include("~/Scripts/kendo/2013.2.918/kendo.all.min.js")…
-
0
votes1
answer298
viewsKeep gridview data source in post-back
I have a gridview that is filled by a web-service with data coming from SAP. It can return up to 2000 row with 30 columns. This content is always the same, so when running the web-service 10 times…
-
0
votes2
answers306
viewsForeign Key error when deleting a record
I have a table with products and another one with the category of this product. In the category table I have a detailsView with a delete button, and it deletes when a category is not associated with…
-
0
votes1
answer604
viewsProblem updating database data using LINQ to SQL
I am developing a C# ASP.NET application in which I search for certain database data, play them in a form, and by clicking 'Save', I want the bank to save the changes I made. I am using Linq to SQL.…
-
0
votes1
answer63
viewsCalling a page with Redirect is giving error
That’s the mistake you’re making: Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack. And that’s the full call code on my master. protected…
-
0
votes2
answers1799
viewsjQuery Mask Plugin does not format the number properly
I am working on a MVC4 project, the mask works correctly when saved, but when returning the database data the plugin shows incorrect data if the value ends in 0. Data example: 99.000,00, when I go…
-
0
votes2
answers1066
viewsContext does not load database data
My context is not bringing the database data. Error messages. Value cannot be null. "Value cannot be null. r nName of parameter: Connection" Value cannot be null. Name of parameter: Connection Cód…
-
0
votes1
answer98
viewsSubconsultas Select
My bank is like this: cd_cliente | nr_ddd | nr_telefone 30 | 11 | 25622791 30 | 11 | 25622791 My select is so: "SELECT * FROM tb_telefones WHERE nr_ddd="+ddd+" AND nr_telefone="+telefone+""; It…
-
0
votes0
answers530
viewsRemove white space reportviewer
have a ReportViewer that conceals the TextBox if empty, but by hiding the blank in the report. The TextBox are positioned vertically then when any of this hide there is a gap between them. Someone…