Questions tagged as 'mvc'

1
answer

Problem Initialize List for ASP.NET MVC validation

I have an action that receives a user file. [HttpPost] public ActionResult UpdateFicheiro(FicheiroViewModel model) { var listaDeFicheirosJaAnexados = servico.obtemficheirosJaAnexados(); model.ficheirosJaAnexados = listaDeFicheirosJaAnexa...
asked by 22.11.2018 / 10:01
2
answers

Best way to pass data to all MVC Controllers [closed]

After logging in by the controller LOGIN , a session is created with the ID of this user on the system, from that ID fetch "with all your information, the big problem is that when logging the user a navbar is at the top of the site, eg:...
asked by 22.05.2014 / 21:39
2
answers

Single database instance

I have a controller and need to access 2 or more tables from my database, eg: $userModel = loadModel('userModel'); $userModel->setTable('users'); $userModel->getAllUser(); $outroModel = loadModel('outroModel'); $outroMode...
asked by 23.05.2014 / 20:43
2
answers

How to understand the MVC architecture in Angular 4?

Hello everyone, this is my first question and it's about Angular 4 . So I studied the Angular Js 1.x and I could fully understand where the MVC architecture fits into the framework , but did not feel the same in < in> Angular 4 . I know, t...
asked by 29.05.2018 / 19:45
1
answer

Return data Json

I have this function to return the data in JSON, but I can not get it to work in MVC Core. public ActionResult SalvarItens(string HoraInicio, string HoraFim, bool Seg, bool Ter, bool Qua, bool Qui, bool Sex, bool Sab, bool Dom, bool Fer, int...
asked by 28.05.2018 / 16:09
1
answer

Parameters in the URL using /

I need to have a URL in the following format:    nomedosite.com/note/ {anything) I need this url to fire the controller Note , with the action Index . How do I set up my route? I tried to use this: routes.MapRoute(...
asked by 30.05.2018 / 13:40
1
answer

Jquery Get Checkbox Value Nearer by Line

I need help with the following: Iwanttogetthecheckboxthatisdisabledandplayonconsole0forwhatisdisabled,and1forwhatisenabled.Mysourceislikethis:(asp.netmvc)@modelIEnumerable<Apontamento.Models.Modulos>@{ViewBag.Title="Acesso"; Layout...
asked by 13.09.2018 / 18:05
1
answer

.htaccess and rewriting rules on PHP server

I'm developing a php microframwork, and I'm using php's built-in server (php-127.0.0.1.18000 -t public) with root directory in public / folder. I do not know if .htaccess works or is running on this server. When accessing a non-root ("/")...
asked by 18.11.2018 / 00:50
1
answer

Create Model from a Migration

I created migrations from the command migrate:generate pendence of the dependency link Is there any way to generate models from these migrations?     
asked by 05.10.2017 / 02:22
1
answer

How do I assign a default date value to a TextBoxFor?

I have the following TextBoxFor @Html.TextBoxFor(model => model.data, "{0:dd/MM/yyyy}", new { @class = "form-control", @alt = "date", @placeholder = DateTime.Now.Date.ToString("dd/MM/yyyy"), @maxlength = "10", @data_val="false"}) As you...
asked by 24.05.2017 / 21:42