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
answer85
viewsSendmessagetowincontrol error - A control type was not specified
I have a web app that generates barcode tags. In order for a client to be able to print, I need to access the port WITH computer. I created a project that does this function. But in order for the…
-
-1
votes1
answer110
viewsCSHTML with tabs is leaving a horizontal line at the bottom of the page
I have a page with 4 tabs. It’s working. I happen to have a div for each tab. The end of the tab and the beginning of the other tab looks like this: ..... </div> </form> </div>…
-
-1
votes1
answer2541
viewsInput sequence was not in an incorrect format
I am receiving the "Input sequence was not in an incorrect format" when I make an inclusion in the bank and update the gridview. But this only happens for the first record. From what I tried I…
-
-1
votes1
answer888
viewsViewbag losing reference after sending form. Asp.Net MVC
Hello, I have two Viewbags that are storing a list each, I click them in a form to make a select box, along with them has a Remove button. So far so good, but when I click on the button of the first…
-
-1
votes2
answers809
viewsPass parameters via jquery to my model
I’ve always passed paramatros to my controller like this: url: '/Minha_Controller/Minha_Função', .... Now I need to pass parameters directly to My Model and I don’t know how to do it. I have this…
-
-1
votes1
answer133
viewsDoes Try Catch influence performance?
Utilise Try...Catch influence on performance? in memory usage? Would be a problem if all actions you do have error handling? try { clienteRepository.Salvar(entity); } catch (Exception e) {…
-
-1
votes1
answer74
viewsPersist in my database values passed by a Dropdown in my html?
I have a dropdownlist with all the states of Brazil. For example: public IEnumerable<SelectListItem> ObterUF() { return IncluirSelecioneNoDropDown(new List<SelectListItem>() { new…
-
-1
votes1
answer1250
viewsBest way to work with XLS and XLSX files
What is the best way to work with Excel, XLS and XLSX spreadsheets in C#? I need to perform cell readings according to the column name, which is specified in the first row. Follow an example below:…
-
-1
votes1
answer121
viewsSum query
I’m having some kind of problem with this query, but what I want to happen is for all values like: Goals Scored, Assists Made,Key passes etc, to make sum for each Player ID making them appear only…
-
-1
votes2
answers207
viewsHow to create a database in SQL Server?
I installed SQL Server, and comes Magnament Studio, how do I create my bank? I tried going there, and I had authenticated by Windows but it is error. How I create my bank?
-
-1
votes1
answer104
viewsForeach result behaves unexpected
I have been working on a page, where I need to create a treeview system with checkbox and this is consuming a lot of my time and leaves me worried about the project’s SLA. In the controller, there I…
-
-1
votes2
answers568
viewsHow I do a foreach inside the View in a Viewdata
Those are my Viewdata on the controller: public ActionResult Acao() { RupturaEntities db = new RupturaEntities(); var _listaUnidade = Enumerable.Empty<object>(); var _listaFamilia =…
-
-1
votes1
answer578
viewsInsert MYSQL into Web form C# - I cannot insert anything
I’m trying to get an insight into my comics of a college app I’m developing. However, I’m having difficulties. Taking the values of the texbox protected void button1_cad_cliente(object sender,…
-
-1
votes1
answer271
viewsHow to remove treatment from a Datetimepicker
I use the Datetimerpicker component to use the heater and set the date, but I would like to remove the treatments of the component, because it makes it difficult to use the user, I already gave an…
c#asked 9 years, 8 months ago Bruno Rodrigues 394 -
-1
votes1
answer73
viewsDifficulty in filtering information
I know my problem is logical and it must come from me, I know, but sometimes a light, not a code ready, but the pointing of a path helps us a lot. 1) I have 6 Combobox in my View that make the…
-
-1
votes1
answer127
viewsInterface implementation error in WCF
I’m making an example using WCF is generated me an error and I’m not able to figure out what could be wrong. Error message: Wcfservice.Service1 does not implement interface Member…
-
-1
votes1
answer246
viewsIs it feasible to use Mysql with Entity Framework 6 and get good CRUD performance?
It is feasible to use Mysql with Entity Framework 6 and get good CRUD performance?
-
-1
votes1
answer88
viewsThis error message appears when running my program
When running my program the following error arises: >Error 1 'AgendaMVC.Models.AgendaDBContext' does not contain a definition for 'Agenda' and no extension method 'Agenda' accepting a first…
-
-1
votes1
answer158
viewsAssign value to variable of type Hiddenfield is giving error
I have this statement: HiddenField vhdfCdTipoUsuario = null; I have this assignment: vhdfCdTipoUsuario = (HiddenField)e.Item.FindControl("hdfCdTipoUsuario"); If I do this, it makes that mistake: if…
-
-1
votes2
answers651
viewsLicensing of Mysql
I’m starting to develop a system that will run on Android, Web and Windows. The 3 versions should talk to each other and the three versions will have the same functions will be a port of the same…
-
-1
votes1
answer379
viewsCombo or Dropdownlist display a Text according to its value
I do a search of my comic book and I bring in, say, number 237. This is the value of my Combo that is equivalent to the text Bradesco S/A. So I would like the Dopdownlist to display this text…
-
-1
votes1
answer110
viewsI cannot assign javascript function only when there is an attachment
I have that code: <strong><a <%# Eval("DsPathDocumento") != null && !String.IsNullOrEmpty(Eval("DsPathDocumento").ToString()) ? String.Concat("href='/UpLoads/",…
-
-1
votes1
answer878
viewsTiered login system with access level
Good morning, I am making a software for completing a course at school, and I need to make a login system with access level (I am programming in layers and using SQL SERVER 2012). I saw a tutorial…
-
-1
votes1
answer50
viewsReceived Webresponse String Editing
I receive information through responseStreamReader.ReadToEnd().ToString();. But before displaying it on the User screen I want to edit it. How to proceed?
-
-1
votes1
answer331
viewsValidation of Data Regex
Good Morning ... I would like to know how I can validate a date ! Where the Final Date Cannot be less than the Initial Date (dataFinal < stardate) with regex !
-
-1
votes1
answer79
viewsFilter Longlistselector [CATEGORIES]
Hello, I have a webservice that returns me a list of "categories" with their sub-categories . I need help to "filter this", for example: Category 1 has sub-category 1 and 2; Category 2 has…
-
-1
votes2
answers457
viewsCheckbox concatenating string several times
I wanted to click on checkbox and then register, save the default value and service name in the database (description). However, the description is a problem for me, because when the user marks and…
-
-1
votes1
answer104
viewsGet currency quotes from date
I am making an application and would like to know if there is any way to get currency quotes from an X date (not necessarily will be the current day) via Webservice consumption.
-
-1
votes1
answer478
viewsE-mail to my account c#
When creating my program, I put a Form so that you can "Report Error/Suggestions". In this way I put 2 textbox and 1 button. 1 textbox for Subject, and the other so that you can write what you want…
-
-1
votes2
answers51
viewsInsert N comments, having the option to edit them at any time and then save those comments
I am doing the registration part of a system, in this registration it is possible to save several comments and edit them as we insert them or later, but it should work as follows, the user inserts…
-
-1
votes1
answer96
viewsDo not always use the boot attached
have a doubt my program consists of sending email with attachments but sometimes when I don’t want to send an email with attachments gives me an error Anyone can help? I can send email with…
c#asked 9 years, 6 months ago Fabio Gonçalves 85 -
-1
votes1
answer566
viewsSelect file without using Openfiledialog
Good, last week I asked this question: Get path from desktop At this point, I wanted the program in Load to use the Openfiledialog method, but without the user having to select the file they want,…
-
-1
votes1
answer220
viewsApplication does not run with Visual Studio 2013
I made two small applications in Visual Studio 2013, which do the following: The first mounts the serial and saves that serial in the windows registry; The second reads key in windows registry. When…
-
-1
votes2
answers88
viewsIncrement Viewbag in . cshtml
I need to step up my ViewBag on my page .cshtml, to my PartialView in my Controller I start her off: ViewBag.count = 0 On my page .cshtml need to increase: example: @{ for (int i = 0; i < 10;…
-
-1
votes1
answer101
viewsProblem sending email using Smtpclient C#
I have a problem sending the email when I run: objClientSmtp.Send(mensagem_email) On the button +, "Non-public Members", there shows the property ClientSmtp.ServerSupportsEai with an Exception:…
-
-1
votes2
answers831
viewsUsing dynamic maps with the Google Maps API
I see examples of how to use the Google Maps API and usually in the examples I see, there is always a default coordinate (initial). Now, let’s say I make a program and distribute this application to…
-
-1
votes1
answer129
viewsConvert Autohotkey script to C# or VB6
I would like to convert the following script done with AutoHokey: DllCall("shdocvw\SetShellOfflineState", "int", False) With that script I can "take" the Internet Explorer in the way offline without…
-
-1
votes2
answers651
viewsValidation of Webforms fields
I’m putting together a registration page with webforms, I need to validate the fields, but I don’t know if it’s better to do it by the method itself onclick of the recording button (via c#) or if…
-
-1
votes1
answer117
viewsHow to organize viewmodels and mappings in the project?
Good morning, everyone ! I am studying about mapping (model and viewmodel), using implicit Operators. But a question arose: How to organize the viewmodels and mappings within the project ? Where…
-
-1
votes1
answer92
viewsHow to set the values of a Propertyinfo of the instantiated classes within a class?
I am doing a generic method for rounding values of a class(T), but I also have the classes within this principal(T), these classes I can set in this way: IEnumerable<PropertyInfo>…
-
-1
votes2
answers727
viewsHow do I add the elements of a List<string> to a listbox?
I have a List in a class, and in the main class I want to take this List and add its elements to a listbox and then display them. How do I do this? Thank you!!
-
-1
votes1
answer791
viewsFile being used in another process
Suddenly my application started giving this error: This started this week, along with a problem I’m trying to solve in another post. I’m beginning to think they have correlation. This gives, give ok…
-
-1
votes2
answers837
viewsHow to get the creation date of a file that is on an FTP server c#
I am using framework 4.5 and would like to know how to get the date and time of creation of a file that is on an SFTP server, do not want to download it, just know the date and time it was created.…
-
-1
votes1
answer4402
viewsCreate C#Folders
I’d like to do the following. Create three folders inside each other in "c:/". Their names shall be designated by textboxes and at last, create a file .doc taking the values of textboxes. It is for…
-
-1
votes3
answers656
viewsGenerate password hash and save to database
can someone provide me with a code that addresses how to hash passwords and save them to the database? It’s just that I’ve already tried to do it, but it’s giving me a headache, in case someone has…
c#asked 8 years, 4 months ago Jocildo Schimanscky 7 -
-1
votes1
answer489
viewsHow to know if a System.Timers.Timer is running?
I need to know if a timer is running, in case you’re not, I’ll start it,
-
-1
votes2
answers124
viewsPassing variable values in ASP.NET and Mysql
Hello, I’m developing a page in Asp.net and I’m having trouble passing values from a Mysql SELECT to variables. I don’t know where to start and would appreciate examples of how to do.
-
-1
votes2
answers2204
viewsHow to create a C# executable with . NET Core?
I’m developing an introduction material to programming using . NET Core. I have read the documentation regarding the creation and execution of projects for the web, but I haven’t found anything that…
-
-1
votes1
answer82
viewsIf Else of date
I have a viewbag, and wanted to display dates of at most 1 day before the current day, I did the code below, but without success, which alternative I would have? if (item.DataHora < DateTime.Now…
-
-1
votes1
answer539
viewsHow to display dynamic images from a Listview?
I created a div with a Listview where a Checkbox and a Imagery which are loaded into the Page_load. I need that by clicking on one of the Checkbox by selecting from the image, it is created…