Questions tagged as 'c#'

1
answer

Is it possible to validate the import of an excel file with regular expression?

I'm importing an excel file using asp.net and validate to see if it's really an excel or not. I do not want to use if and else , so I'm trying to do this through annotations . My main idea now is to use regular expressions , I...
asked by 15.12.2015 / 20:49
1
answer

Sending post to ActionResult via knockout

Personal speech, following: I'm trying to send post using ko , to a ActionResult method of my controller instead of a JsonResult as usual. When debugging the project it goes into ActionResult but does not open...
asked by 24.09.2015 / 00:38
1
answer

Close the browser only after running all tests with Selenium Webdriver C #

I'm developing tests with Selenium webdriver in C #, for each test class the browser is initialized and after running all the tests of this class the browser is closed. How do I initialize only once and close only after running all tests of all...
asked by 21.09.2015 / 19:40
1
answer

LEFT Outer Join does not work in LINQ when 0 is the reference? only null

I'm having doubts on Left Outer Join, I'm using MVC 5 C #, Net 4.5.2. I have the Next Model Supplier public class fechamentoFornecedor { public int FornecedorId { get; set; } public int Tipo { get; set; } publ...
asked by 26.02.2016 / 15:09
1
answer

Sql generated by Linq

Hello, I would like to know how to view the sql code that a linq expression generates to be run by ADO.Net. I'm using NHibernate as an ORM framework.     
asked by 03.03.2016 / 20:49
2
answers

Json Array for String Array C #

I just need to get the names of the json moderators and viewers: { "_links": {}, "chatter_count": 16, "chatters": { "moderators": ["gumagames", "juliavidoto", "nightbot", "pinkpanthersz_", "victoriia66"], "staff": [], "admins...
asked by 01.03.2016 / 22:05
1
answer

Question with asp.net MVC parameter passing

You are calling the controller but you are not calling ActionResult, I have my view: @model IEnumerable<Generico.Dominio.TB_MENU> @{ ViewBag.Title = "Index"; } @Html.Partial("_navbarInterno") @Html.Partial("_PartialLogin") <...
asked by 28.12.2015 / 23:18
1
answer

"arithmetic exception, numeric overflow, or string truncation string right truncation" in search using LINQ

I have a table in a Firebird database CREATE TABLE CIDADE ( CID_CD SMALLINT NOT NULL, CID_DS CHAR(20) NOT NULL, CID_UF CHAR(2) NOT NULL, CID_DISTANCIA_SEDE SMALLINT NOT NULL, CID_CD_ALTERNATIVO INTEGER...
asked by 08.01.2016 / 17:13
1
answer

Problems sending e-mail asp.net.mvc

Does the SMTP server require a secure connection, or was the client not authenticated? [HttpPost] public ActionResult Index(string login) { try { var tbuscar = new UsuarioAplicacao(); var retorno = tbuscar.ListarPorLogi...
asked by 29.12.2015 / 21:12
1
answer

Open files of a certain extent in my program [closed]

I'm doing an application in Visual Studio, with the intention of working with extension files itself ( .rmt , subject to change) and can open it later. I want the user to double-click the files with this extension, the system opens the...
asked by 24.12.2015 / 20:12