Questions tagged as 'asp.net-mvc'

1
answer

How to decrease byte array size representing an image

I have an array of bytes in base64 that is in a String in C #. It represents an image. The size of the String is between 50 and 80 thousand characters. I would like to know if you can reduce this size, compressing and removing the quality of the...
asked by 29.04.2016 / 01:38
2
answers

How to remove mascara from the field before calling the controller with asp net MVC

In my registration form I have a CNPJ field with the mask set via jquery $("#cnpj").mask("99.999.999/9999-99"); however the value is arriving in my formatted controller, in my database this field is float, is there a way to handle this w...
asked by 04.11.2015 / 00:47
2
answers

Best way to bind objects from 1 to N - asp.net MVC

I'd like to know how to best give the Binding of data in object FuncaoGrupo of my Controller . Each item in the Funcoes list will generate 4 Checkbox in the View. I have the following class: public class GrupoDeUsuari...
asked by 17.11.2015 / 02:39
1
answer

I have the reference, but when I rotate the CLR says that the reference is missing

I have this include in my project: System.Web.MVC.Ajax . However when I run the application I get a runtime error, in the file web.config . If I comment on the error line in web.config , the error appears on the bottom line,...
asked by 13.10.2015 / 14:49
2
answers

Capture Machine ID with C #

Good morning, I have several computers with the same IP output, how can I get any information that leads me to know which computer came a request? I use C # Asp .Net MVC     
asked by 30.09.2015 / 15:59
1
answer

User registration and password

I have an acceptance problem. After setting the Microsoft.AspNet.WebPages.WebData and the corresponding classes, the system correctly created the tables in the database so that I could implement the code for user registration, password an...
asked by 14.01.2016 / 13:47
2
answers

Compare DayOfWeek in an ASP MVC query

I'm trying to make a query where I check if the week day is the chosen one to create a list of data that loads in a ViewModel. Query: var plan = db.Servicos.Where(s => (TecnicoResp.HasValue ? s.NumTransportado == TecnicoResp.Value...
asked by 18.02.2014 / 17:47
1
answer

Return Dowload Excel via MVC Controller

I have a method that generates an excel file and writes it to a directory, but then I get the directory path and need to download the excel file, but nothing happens, no error. Can someone help in what I'm failing? [HttpGet] public FileRes...
asked by 29.05.2017 / 20:13
1
answer

I am not able to make the value of a property be selected using the Razor Helper DropDownListFor

In my ASP.NET MVC 5 application I'm using .Net 4.5 I'm not able to make the option selected for a given property. Example of my class: public class Funcionario { [Required(ErrorMessage = "O campo {0} é necessário")] [StringLength(15...
asked by 05.03.2014 / 18:39
1
answer

Asp.Net MVC with two views and a URL

I made a website that should work with the following setting. NavBar at the top, this is ok. Below it I have a container div, it is divided into two parts, the left part is a list of, can be called tags, the left side that is where the sit...
asked by 07.05.2015 / 02:54