Questions tagged as 'asp.net-mvc'

4
answers

How do I update my data in the table using EntityFramework?

var contactado = ContactadoRepositorio.ObterListaContactadoPorCodigo(procedimentoVM.CodContactadoPessoa); //obtenho o contactado pelo id obtido; foreach (var c in contactado) { var contactadoPessoa = new ContactadoPessoa() {...
asked by 21.01.2015 / 13:35
1
answer

How to resize thumbnails generated by Uploadfy? ASP.NET C # MVC 4

Hello, I would like to know how to resize the thumbnails generated by the jQuery Uploadfy plugins. As I show in the print below, it generates the thumbnails according to the actual size of the images, is it a good practice to only resize them in...
asked by 17.03.2014 / 15:21
2
answers

Progress bar on file upload and information registry

I'm developing a project, where I use upload files, as well as an information registry. Both the file and the information are registered in the same form. So far so good, but it's usually that when there is a larger file, it takes about 20 to 30...
asked by 25.07.2015 / 21:23
1
answer

DateTime field display in View without part of Hours

With the code below I'm retrieving the DateTime with the time beyond the date, which I do not like. cursos.Data = DateTime.Parse(collection["Data"]); I tried to format using the substring within DateTime.Parse, but I did not succeed. My...
asked by 01.08.2014 / 14:41
1
answer

How do I block menu buttons, when a form has not yet been saved, is it possible?

I'm new here. I'm starting in C # and I came across the following doubt: I have a form, where I have not yet given a post yet, and I did not want to let the user leave this screen without saving. What is the best practice for doing...
asked by 30.09.2015 / 20:03
1
answer

Multiple authentication types

In my system I need to have two types of authentication for Common User that will register and etc ... and another for the administrator my question is how do I differentiate the two authentication using FormsAuthentication, I believe it will ha...
asked by 20.05.2014 / 16:20
1
answer

Upload Gif while site loads!

I am developing a site (MVC), where there is a user's option to select an Excel file, and all the data in the table is sent to the database and only then a warning of success or failure appears when writing the data . This task takes some tim...
asked by 05.06.2017 / 17:48
2
answers

How to pass variables from the Controller to the View in ASP.NET MVC 4.5?

I'm pretty familiar with MVC in PHP where I can pass the values to view from the controller as follows: public function Index(Users user) { return View('index') ->with('user', $user); } Or to return validation errors: p...
asked by 24.02.2016 / 17:09
1
answer

How to test an asp.net mvc controler using Moq and Entity Framework 6

My controller: [Authorize] public class DominioController : Controller { private IDominioDB _db; public DominioController(IDominioDB db) { _db = db; } // GET: Dominio publi...
asked by 06.10.2015 / 03:09
1
answer

Error in using ViewBag in DropDownListFor ASP NET MVC

I have a DropDown that lists the categories of my system, plus when I submit the form without choosing a category, it gives a server error saying that the value can not be null. I put a validation with the ValidationMessageFor, but anyway it doe...
asked by 26.09.2015 / 03:18