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
answer213
viewsCan I add content tables in the same database as Users? ASP.Net Identity
I created an ASP.Net MVC 5, EF 6 project with individual accounts. The database is automatically generated with 5 tables: Aspnetroles Aspnetuserclaim Aspnetuserlogins Aspnetuserroles Aspnetusers Is…
-
0
votes1
answer1749
viewsWebservice REST POST error request
When making the request for POST is returned me this error message: O servidor remoto devolveu um erro: (400) Pedido incorrecto. Iservice finds - if closed this way: [WebInvoke(Method = "POST",…
-
0
votes1
answer579
viewsWhy is the Entity Framework generating a new record in the database?
Next, I’m working on a new project Asp.net-mvc, and I have 3 classes. public class Anuncio { public int AnuncioID { get; set; } public string UsuarioID { get; set; } [Required] [MaxLength(255)]…
-
0
votes1
answer1027
viewsHow to return the value of an Entity Framework field c#
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using…
-
0
votes1
answer250
viewsExtractexistingfileaction.Overwritesilently is not overwriting the files in a particular folder
I have an update solution for an application that uses the Dotnetzip API (http://dotnetzip.codeplex.com/) for handling ZIP files. One of the methods used is to overwrite files in certain folders as…
-
0
votes1
answer510
viewsGlobal.asax file does not load
I have a project in Webforms and wanted to make routes in it. I followed an answer that they gave me in another topic and everything worked very well, but now I went to create another project and it…
-
0
votes1
answer117
viewsTransforming Checkboxlist Labels into strings
I have a checkboxlist with some items and their name are the directories so I can save the file. I wonder how I get the name of each label selected from checkboxlist and turn it into a string. I…
-
0
votes1
answer247
viewsLarge volume data loading with Nhibernate + Windows Forms
I use the ORM Nhibernate in a windows Forms project and there is a forecast to work with a large volume of data in several tables, ranging from 1 to 15 thousand records on average. Although it is…
-
0
votes2
answers4407
viewsPass data between Forms
I am working on my TCC and I needed to make the data collected in the register serve as login, because we do not have a server yet to store this data, so they are being done with ArrayList. Follows…
-
0
votes1
answer120
viewsurl in MVC project of an . html
would like to create a . html that will serve to be the menu of _Layout.cshtml, I will call it through $("#IDMenu").load('menu_Home.html'); My question, where better to leave it? I can leave it in…
-
0
votes1
answer1006
viewsSession variables in ASP.Net
I have an AJAX method that sends me a certain value, when requested, for a session variable (a list of strings in this case). Session variable private static List<string> ListData { get{return…
-
0
votes1
answer1135
viewsHow to pass parameters to the _Layout.cshtml view in Asp.Net projects
Hello, seeing as I have one Area control panel my layout basically changes only the center with the views, but I want to put functionalities in the part where the _Layout.cshtml, and for such…
-
0
votes1
answer802
viewsSimulate click on Webbrowser using C#
I wanted to know how I do to realize a click on an element of a website (at the end), I would like him to click on that element. href="javascript:;" class="spot drugdealer" title="Traficante de…
c#asked 10 years, 6 months ago Fernando Neves 117 -
0
votes2
answers608
viewsValue when null does not show the value in xml
I did that: if (lis.DT_TransacaoV == null) pdv.Transacao = "Não Recebido"; else pdv.Transacao = "Recebido"; I have in the object PDV a property called Transacao string type. If it is different from…
-
0
votes1
answer309
viewsHow to create Detachedcriteria criteria for a field from a Join table?
First time I move with this and I’m having trouble fitting the query properly. Here’s my code done the wrong way, so you’re not obeying the conditions: public IList<Ficha> ObterFichas() {…
-
0
votes1
answer1765
viewsHow to render Action by accessing controller in this case?
I’m using a ready template and I use the bootstrap, but the menu transaction is done through javascript animations and with the tag <Section> html, as follows: <section class="section"…
-
0
votes1
answer95
viewsUnable to read Beyond the end of the stream
I was trying to create a socket connection between Java and C#, Java being the client and C# the server. But when I use Binaryreader to read the data, it returns an error: Unable to read Beyond the…
-
0
votes1
answer295
viewsDoubt on how to post a method to a web service, hide
What I’m going to ask I don’t know if it’s possible or how to do it. Well, I have a REST that so far is ok. There, they changed a rule here that directly affects the REST API. I have a method that…
-
0
votes1
answer231
viewsMap Id of one model to another without a Dropdownlist
I had a problem making relationships in my application. my project is from a school, and in it I have to have the occurrences. But when it comes to relating the Student to the Occurrence happened to…
-
0
votes1
answer384
viewsException when trying to authenticate SSL connection
On my client when trying to authenticate an SSL connection an exception of type is raised AuthenticationException. Errors found in the certificate are RemoteCertificateNameMismatchand…
-
0
votes2
answers3488
viewsCustomer Facilities, WCF or Web API?
I need to create a web service for data insertion in a database that requires validation to ensure data integrity. I have as a requirement, to facilitate the use of my "clients". Therefore, I must…
-
0
votes1
answer1319
viewsHow to enable a button after completing the required fields?
I need the button btnprint is enabled only if the DropDown, the txtDateInitial and the txtDateEnd were filled in. They could help? <%@ Page Title="" Language="C#"…
-
0
votes1
answer563
viewsHow to pick up Radiobuttonfor value through Formcollection and save to SQL Server BD
I have a model with several booleans, I need to take their values through a Formcollection and save in the SQL database (does not accept Boolean, so the field is as bit). My View: <div…
-
0
votes2
answers210
viewsProblems with the presentation of cshtml(Visual)
I have a cshtml, which is shown like this: A sequence of filters that are fixed. When I click search, then I get the return of a method in the controller via json by a jquery function and in the…
-
0
votes2
answers1220
viewsError povoar combobox - An unhandled Exception of type 'System.Invalidoperationexception' occurred in mscorlib.dll
This is a Cod. to fill a combobox with a list that will be populated by the insert event that will redeem a value from a textbox, and will cause the name selected in combobox1 not to appear in…
-
0
votes2
answers234
viewsA way to unify calls in WCF Service?
Greetings to you all. Currently I have a WCF Service Application running on IIS with many services, to each new service created I need a new update and a new reference on the client side. As I am…
-
0
votes2
answers197
viewsError making an insert in the database
I am trying to save some data in the database and am getting this error: The INSERT statement conflicted with the FOREIGN KEY Constraint "Fk_dbo.Occurrences_dbo.Alunoes_alunoid". The Conflict…
-
0
votes2
answers623
viewsDoubt on how to select a record via Inq
I have a chart, where I only record scripts. There is a field, where I separate whether it is technical script or central script. There is a field TipoScript char e is "C" or "T". This table was not…
-
0
votes2
answers459
viewsAccess peripheral devices through the browser
I am developing a web system for financial control is necessary to print tax notes in thermal/tax printer. It would be possible to integrate this device through the browser or I will be required to…
-
0
votes3
answers335
viewsRepeater Onitemcommand event does not work
I’m having trouble with a Repeater on the webform, where the Onitemcommand event is not working. It should be triggered when I click on the linkbutton. Code aspx: <asp:Repeater…
-
0
votes2
answers634
viewsHow to group text file according to first line parameters in C#?
I was able to join several text files of the same directory in a final text file, grouping the equal codes and adding their respective amounts, using the following code (credits to friend Vitor…
-
0
votes1
answer595
viewsCombobox which best method: Onselectedindexchanged via autopostback or Jquery?
I have the following Dropdownlist on Asp.net Webform <asp:DropDownList ID="DDL_Categoria" runat="server" CssClass="form-control" AppendDataBoundItems="true" > <asp:ListItem Value=""…
-
0
votes1
answer54
viewsMethod does not act as expected
When I go to check the following code, there is nothing in any of the ComboBoxes. For me, everything is normal, I see nothing wrong, what can be? public FormExemplo() { ExemploList = new…
-
0
votes4
answers1330
viewsHow to load a C library into C#?
I have an extension file lib, done in C, which I need to use in an application that was programmed in C#. When searching for the subject, I read about Wrappers, but I didn’t understand it very well.…
-
0
votes1
answer388
viewsCreate registration pattern with C# UI repository
I created in my system a repository with EF6, each registration I do access the methods of my repository to commit the actions I need (Insert, Delete etc...). The problem is that my system is very…
-
0
votes1
answer89
viewsService class layer BLL
It is bad practice to have a very extensive method within my service class? Or it would be better to divide them when possible into smaller methods in the same class and call them?
-
0
votes2
answers256
viewsC#: Return value of a href
How do I get the address/URL of a tag < a href="js:redir(2)"> Through an HTML source? NOTE: I tried to use Assembly mshtml, but it also didn’t work!
-
0
votes2
answers91
viewsVisual Studio 2013 only opens 2012 projects
Whenever I will create a new project on VS2013, I have no project option, just the option: WEB >> Visual Studio 2012. Then yes, I have several project options like MVC 3 and 4 and so on. How…
-
0
votes2
answers76
viewsError using store Procedure - Entity
I used a store precedure for authentication in my application as suggested... insert link description here But now you’re making the following mistake...…
-
0
votes1
answer316
viewsHow to change the font in Richtextbox?
I wonder how I do to edit the font and color of a Richtextbox word in C# And if possible how I do to number the lines.
-
0
votes1
answer1646
viewsHow to make flaps like Chrome
I would like to know how I create tabs like that of Chrome. I thought with the TabControl but there is no way to put the close tab button and new tab. How I do? PS: I want to make a standalone for a…
c#asked 10 years, 4 months ago mrlucasrib 641 -
0
votes2
answers399
viewsDoubts about licenses
All programs made in "such" programming language are free to market? and regarding C# and javascript?
-
0
votes1
answer869
viewsHow to change component attributes between Forms?
I have an application in C# with a parent Form (FRM_PRINCIPAL) that contains a button (BTN_ACT) that calls a Child Form (Form2), which in turn contains a button (BTN_REG) containing some functions,…
-
0
votes1
answer963
viewsHow to set the installation location in Clickonce?
I am developing an application in VS2012 using WPF, I am using Clickonce itself to install the application, only it always installs in users' folders, like: C: Users USERNAME Appdata Local Apps 2.0…
-
0
votes2
answers155
viewsHow to check WHERE clause with apostrophe in a DELETE operation?
I need to delete a record, however, in the WHERE clause one of the data has apostrophe. How can I verify this information, because it is obvious that will give error. DELETE FROM IES WHERE…
-
0
votes1
answer368
viewsError while consuming a web service Rest method
I created a method where my partner, besides receiving data from our base, also sends us. Well, this was working well. Then I discovered that a field was missing. I added this field to the interface…
-
0
votes2
answers3813
viewsHow to change the border color of a Groupbox
How to change the border color of a Group-box? Because I need to put a very light background color...there the edge of the Group-box q I have almost do not appear because they are a very light gray…
-
0
votes1
answer742
viewsHTML/Javascript Connection Webservice C#
I’m trying to make a connection to the bank using web service. I even set up an example where I created the functions sum and multiply in my Webservice, but I’m having difficulty connecting my…
-
0
votes1
answer358
viewsMVC Webapi Ajax error on type-approval server only
I have a mvc page that calls a method in the webapi (another project within the solution), it turns out that in the localhost everything works normally, when it will homologation, when calling the…
-
0
votes1
answer245
viewsI can’t call the function
I made that code Quick Sort below and I can’t call the function. So far I’ve only done basic functions and can’t find the error. public static void ordenar(int[] vetor) { ordenar(vetor, 0,…