Most voted "mvc" questions
Model-view-controller (MVC) is a model of software architecture that separates information representation from user interaction with it.
Learn more…743 questions
Sort by count of
-
0
votes0
answers1057
viewsPassing data to a modal with PHP and Ajax
I am creating a system and at a certain moment the user can register the measurements of a person. For this, I would like to redeem in the table of people the ID and the Name, so that they are…
-
0
votes1
answer170
viewsCall PHP function via Link using MVC
I’m having Difficulty/Problem requesting a function in PHP: The function below is located in a class inside the Folder lib. Language.php <?php namespace app\lib; class Language { public function…
-
0
votes1
answer314
viewsPHP MVC - How to run Model methods?
Good afternoon! How do I execute a method of the Model class, in specifying an insertion method to the BD, in case I need to send the Form data. This is the form in View (sector.php): <form…
-
0
votes1
answer47
viewsHow to make a column with always fixed data in a Datatable? MVC JS
Hello. I have a Datatable that is returning BD values, but I need only one column to always have fixed values that will not come from the BD (in this case, it is a column with the months of the…
-
0
votes0
answers25
viewsHow to change the Model data being shown in Gridmvc?
I have a Gridmvc in my form where displays a list of units, in this grid has a text field, and a checkbox, I would like when the user type some text box or catch the check, this change reflected in…
-
0
votes1
answer54
viewsValidate date in editfor
I made a date mask and would like to know, how I validate the date right there, IE, already in Edit he does not accept date like: 23/16/9087. This is my date editfor <div class="form-group">…
-
0
votes2
answers85
viewsDropdownlistfor with Viewbag and Dictonary returning null value
I would like the help of all to assist in the following problem: The error happens when it is still validating the fields. Controller: public ActionResult Create() { var vEmpresas = new…
-
0
votes1
answer41
viewsHow to save data through Model?
My difficulty with MVC is how calls work. For example, I’m working on a form: <form action=""> <label>Paciente:</label> <input type="text" name="usu_nome" id="usu_nome" value=""…
-
0
votes1
answer50
viewsMVC Codeigniter
I have a question regarding the passage of parameters between the MVC. I’m developing the e-mail confirmation on a project. After clicking the link to confirm sent by email, the system picks up GET,…
-
0
votes1
answer232
viewsWhat does the addViewControllers method of the Webmvcconfigurer Spring boot class do?
I am using Thymeleaf on the front end of the application and have the following configuration class, with the addViewControllers method in question : @Configuration public class WebConfig implements…
-
0
votes2
answers724
viewsFlask MVC - doubts
I have doubts about making my application as organized as possible, I’m having trouble implementing MVC ... This is the file that starts the application from flask import Flask app =…
-
0
votes1
answer20
viewsData sent to Model Clean when changing Page?
A question that came to me now, based on this post: Building Customizable ASP.NET MVC Menu If I popular my model of Menuitem when the user logs in, it will popular, for example, with the following…
-
0
votes1
answer347
viewsRazor MVC - When using @using (Html.Beginform()) the fields are not in front of each other
I’m starting to study MVC + Razor and in example of basic CRUD, I’m trying to put the fields in two columns, as if I was using in HTML. But my code only works if I withdraw the @using…
-
0
votes0
answers41
viewsDoubt - Send Ajax at Checkbox Click (Performance, Network)
I have a table in a view, which lists the modules, with each module and each user, and a checkbox that indicates whether or not the user has access to the module, and I want in the action of…
-
0
votes1
answer158
viewsHow to call my view Asp.Net MVC with ajax
I am starting my studies with Asp.Net MVC and I am able to call a view from the main menu. I have an initial view "_Layout" with the following menu item: <li> <input type="radio"…
-
0
votes1
answer220
viewsButton created Dynamically does not fire Asp-action - core 2 MVC
I have a cshtml (view) on this page I use a typed template and inside I use a POST form, I create a div(dinamicamnete with ajax) with some components, ALL appear normal, but the button to fire an…
-
0
votes1
answer57
viewsError creating custom ASPNET MVC validation ( Client Side )
I’m having a problem creating a custom validation using dataannotations by aspnet mvc. My Model: public class Usuario { public string Nome { get; set; } [Idade(18)] public string Senha { get; set; }…
-
0
votes1
answer32
viewsSerial ID not assigning to model id
I’m making a website that receives for a Webservice, data from a dvd (from a site of another colleague), and creates an offer with his information. I think I’m having trouble with the MVC…
-
0
votes1
answer109
viewsInput field selection with Jquery
all right? Can you give me a help related to the selection of text typed by a user in a form? I’ve tried some solutions I found here, but they didn’t work. I’ve also tried different approaches with…
-
0
votes1
answer525
viewsASP.NET MVC - How to upload a file with more than 5mb using ajax?
I am using the following code to perform file upload: HTML: <form action="/Employee/FileUpload?UnityId=1&ObjectId=1" data-ajax="true" data-ajax-failure="OnFailure" data-ajax-method="Post"…
-
0
votes0
answers589
viewsPK and FK Conflict in SQL Server Database
I am facing a Primary Key and Foreign Key conflict problem in SQL Server 2017 Express. I am using ASP.NET with Entity Framework Code First (Migrations). The problem is that when I add a new Client…
asp.net-mvc sql-server asp.net-mvc-5 mvc entity-framework-6asked 6 years, 1 month ago Alexsandro Andrade 1 -
0
votes0
answers82
viewsI cannot pass view parameters to controller in MVC using URL
I’m doing an MVC project and I’m not getting through to Controller the parameter window that is coming up to View. I’ll pass the two classes, if you need more information see edit here: List…
-
0
votes1
answer109
viewsSolved - Rewrite HTTP to HTTPS with Let’s Encrypt
I have the . htaccess file with the following content: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.+)$…
-
0
votes1
answer606
viewsPass id value to from one view to another - Asp.Net MVC
I have the following view where I have a list of articles registered in the database, then I have the evaluate button that redirects to another view where it is in another controller, I want to pass…
-
0
votes0
answers92
viewsPrint on client side with C# MVC automatically
I need to automatically print a PDF file that is in a folder on the server, but the printing has to be in a specific printer on the CLIENT side. if (!String.IsNullOrEmpty(caminho)) { string…
-
0
votes1
answer266
viewsText field does not take Asp.net MVC value
I have a text field in my system called NomeEspecificacao, however when I fill any value in it, it is always returned null in my Action, ie never comes the word I write in the text field. View code:…
-
0
votes1
answer202
viewsSearching more than 1 field with Findby in spring mvc
I have this repository: public interface RepositorioUsuarioPermissao extends JpaRepository<UsuarioPermissao, Long> { @Query("SELECT u FROM UsuarioPermissao u WHERE u.id_seletivo = ?1 and…
-
0
votes0
answers68
viewsChange create.objectURL to Htmlmediaelement.srcObject
When adding the createObjectURL class, it is accusing the failed error in some browsers, after searching, I found that I can use Htmlmediaelement. But how can I include you in my project? export…
-
0
votes2
answers130
viewsI have Error in viewModel ASP.NET MVC C#
What I looked for, we used viewmodel to then access in the view several models, my problem is that I have an error that does not allow me to access the Model. And everywhere I look, I can’t figure…
-
0
votes1
answer99
viewsCodeigniter/PHP - Problem sending Model Data to View
Good night, I am using Codeigniter 3.1.10. I have a problem sending a specific data from the Model database to the Controller: var_dump($data) returns me only the array I passed that would be the…
-
0
votes1
answer238
viewsProblem with Onkeypress and Onenterkey
I have a problem, I need to get the value typed in a field, I thought to use OnKeyPress calling the function key_press as follows: var str; var keycode; function key_press(e) { var event = e.event,…
-
0
votes1
answer188
viewsSite MVC C# displays the message "401 - Unauthorized: Access is denied due to invalid credentials." after logging into external access
I created the normal MVC C# site without any peculiarity. In the Default Controller the index was this way. [AllowAnonymous] public ActionResult Index() { return View(); } [HttpPost]…
-
0
votes0
answers349
viewsI lose the $_SESSION from one view to another php mvc system view
I’m creating my own mvc php to acquire more knowledge. But I’m running into something very strange, I miss the $_SESSION of a view to another view. a. php ----- view a.php <?php session_start();…
-
0
votes0
answers31
viewsHow to perform 2 different submits in the same action?
I have a view with 2 different forms, when performing the first Submit I receive the data in the controller normally, when performing the second Submit the data comes all as nulls. How can I fix…
-
0
votes1
answer951
viewsHow does csrf-Protection work in Codeigniter?
Today while working on a codeigniter project, I came across the concept CSRF - Cross-site request forgery. This happened when I got error 403 - permission denided when making a GET request in AJAX…
-
0
votes1
answer26
viewsError while passing index of an array
Good night. I believe my problem is simple, but I found nothing to cure it. I’m doing a CRUD in PHP, using MVC, to learn how the language works. It turns out that the Mysql database works with date…
-
0
votes1
answer47
viewsVariable passed to view does not contain the set value
I am creating a PHP framework and in my Controller class, I have a method render, where I receive two parameters, the filename (which would be the view), and an array of variables that will be…
-
0
votes1
answer51
viewsBring model value to Textarea
I have the following page cshtml @using SoftluxWebCore.ViewModels.Tabelas @model SoftluxWebCore.ViewModels.Tabelas.MensagemViewModel <!-- Link to CSS --> <link href="~/css/Geral/create.css"…
-
0
votes3
answers231
viewsDo require_once within the classes. Is it possible?
I’m trying to create a architecture new based on a need and I’m having some difficulty. So I decided to create an example minimum, complete and verifiable of the application. It is a architecture…
-
0
votes1
answer22
viewsProblems with select command of Line
The query worked she has 2 questions randomly with the 5 options each. The problem is that my select loads the view described below: public class QuestaoOpcaoModel { public int QuestaoId { get; set;…
-
0
votes1
answer61
viewsI would like to understand why when Modelstate is invalid, Viewmodel instantiation is "ignored" and form fields remain populated?
Follows my code: Subcategory Model public class SubCategoria { public int Id { get; set; } [Required(ErrorMessage = "Campo {0} é obrigatório")] [StringLength(200, ErrorMessage = "Campo {0} precisa…
-
0
votes0
answers142
viewsHow to return to previous View without losing data
I have a problem that I can’t solve, which is this. I have a screen that loads two simulated (each simulated has the questions and the radios Buttons that are the options). The simulated ones are…
-
0
votes0
answers26
viewsFill screen with data from an auxiliary table
I created a Service Order registration, the insertion is working perfectly, I’m trying to create the change page, this screen brings all the data, I just can’t list the items in the table. Follows…
-
0
votes0
answers22
viewsNotice: Undefined index - error when trying to perform a $_POST in controller (MVC)
I’m trying to make a dynamic combobox with html, php and javascript. To do this, I need to send the selected value in the first select (View) to my Controller file, but the following error occurs:…
-
0
votes0
answers230
viewsHow to create a select & option hierarchy of categories and subcategories (MVC)?
I am creating a select & option system for a Marketplace, where selecting a category from the first select will generate another select with the subcategory options of the selected category.…
-
0
votes1
answer38
viewsPlacing disc or Circle or square markers does not work
I did that <tr class="espaco-branco table-prod-add"> <ul type="disc"> <li> <td style="white-space: nowrap;"> @mainItem.ShoppingCartMessage </td> </li> </ul>…
-
0
votes1
answer35
viewsProblem with Controllers
I’m having trouble implementing the MVC standard presenting the error below: Typeerror: application.app.controllers.admin.noticias_save is not a Function const { check, validationResult } =…
-
0
votes1
answer325
viewsMobile Validator in a Rest Api query
Today I use SMS sending system for our customers who are registered on Tiny ERP, but I am in need of a mobile validator to be able to send scheduled SMS that are saved in a local bank. The problem…
-
0
votes1
answer74
viewsClear List after Request via JS Dropdownlist in Cascade
I have 2 Droplist one of Client and another of Project, after selecting the client he should receive the projects that are with Idcliente, I managed to do everything right, however when selecting…
javascript jquery mvc asp.net-core entity-framework-coreasked 5 years, 3 months ago Guilherme Palange 147 -
0
votes1
answer50
viewsAmbiguity error Asp.net mvc
with this controller: public ActionResult Create([Bind(Include = "ImagemId,Image,ImagemTipo")]Imagem imagem,List <HttpPostedFileBase> upload) { if(upload != null && upload.Count> 0)…