Questions tagged as 'c#'

1
answer

Write to DB without mask applied by jQuery

I'm doing a project in MVC and with the use of jQuery I made the CPF mask as below: $(document).ready(function() { $(".cpf").mask("999.999.999-99"); $(".cpf").addClass("form-control"); }); Follow my div : <div class="form...
asked by 06.05.2017 / 18:17
1
answer

Best way to work with XLS and XLSX files

What is the best way to work with Excel spreadsheets, XLS and XLSX in C #? I need to perform cell reads according to the column name, which is specified in the first row. Here is an example below: Note: Inside the XLS or XLSX file...
asked by 26.11.2014 / 19:54
1
answer

Persist in my database values passed by a DropDown in my html?

I have a dropdownlist with all UF of Brazil. For example: public IEnumerable<SelectListItem> ObterUF() { return IncluirSelecioneNoDropDown(new List<SelectListItem>() { new SelectListItem()...
asked by 20.11.2014 / 12:48
1
answer

Attribute is not recognized, but Namespace is added [closed]

My [DataContract] attribute is not being recognized, but the namespace System.Runtime.Serialization is added to my using . Does anyone know why? .... using System.Runtime.Serialization; using System.Data.Linq.Mapping; names...
asked by 12.05.2014 / 21:27
1
answer

Result of foreach behaves unexpectedly

I've 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 SLA. In the controller, there I have a LINQ that returns everything I need on the...
asked by 18.09.2014 / 15:45
1
answer

Insert MYSQL in Web form C # - I can not insert anything

I'm trying to make an insert in my bd from an app from the college I'm developing. However, I'm having difficulties. Getting the texbox values protected void button1_cad_cliente(object sender, EventArgs e) { Clientes cl = new C...
asked by 22.09.2014 / 05:53
1
answer

Relationship of two tables MVC C #

How can I make a Lambda query, I have two Permission and Employee tables, where to inform the email of the Employee, it brings me the permissions of the Employee, through the email that I reported. In SQL looks like this:...
asked by 23.09.2016 / 19:56
1
answer

Error calling a method in ASP.NET Web API and Ninject

I'm getting error when trying to call a method from a Web API. Method declaration in ApiController public class AcessoController : ApiController { [HttpGet] public UsuarioModel ValidarUsuario(string login, string senha, stri...
asked by 06.10.2016 / 20:33
1
answer

Doubt in Procedure

Personally I did a function in SQLServer which does control a graph for me in C #, this function brings me all the students from a referring school. The function is as follows: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER OFF GO...
asked by 24.04.2014 / 16:47
1
answer

Problems with Dev-cpp [closed]

I installed Dev-Cpp 5.5.1 and it shows an error like this when I try to compile:    "Failed to execute (and the file path)". Can anyone help me with this? I've tried version 4.9.9.2 and the same error occurs.     
asked by 26.03.2014 / 17:02