Category "model-view-controller"

Want to show/hide Div Query - JavaScript - based on what a sql query returns

My project is a MVC c# Asp.NET project. I want to check if an attachment has been loaded, if there is an attachment it shows the div that contains the attachmen

On DatatableJS server side, how to make a column's order not callback server?

I use datatablejs server-side in my MVC project. When I click to a column it sends the column name to server and I take the column name after all I order the ta

Pass multiple parameter to Ajax from link in MVC Core

I have this link <a asp-action="goPay" asp-route-id="@item.Appid" asp-route-mem="@item.Memid" asp-route-amt="@item.Areq" asp-controller="Withdraw" class="btn

Proper way to use ViewBag for selectlist

I am getting an error on my selectlist when I open the form. Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'Cannot convert type 'System.Collections.Gen

HttpContext GetEndpoint on modified request path .net 5

I'm trying to create a middleware to handle country code in the url. The code i have works great for removing the country code, so it's routed to the correct en

How to implementing Repository patten with entity frame work mvc

i am trying to implement repository pattern in mvc. but I am stuck. I want to return related data. I have two classes , tbl_Account (contains users )and tbl_Cou

How do I get the userId to save in the database while submitting the form?

I'm a beginner and well i'm doing a form which is capable to send information to the database but I needed one more thing to be sent and it is the Id from the u

codeigniter tutorial - changing text color based on boolean

I am working on the codeigniter tutorial but my assignment now says to add a boolean row named "importance" to the database and set one of the news articles to

Sort dynamic model with orderby

I am combining 2 tables that I transferred to the dynamic model into 1 table in the cshtml part. And I want to sort that table by a column(OrderBy). How can I d

How to show id in Resource Routes url?

Update: This line of code in the frontend was the culprit: <inertia-link v-if="options.edit" :href="'/admin/gallery/edit/1'"> I had to change it to: <

Fatal error: Trait 'Laminas\Db\Adapter\Laminas\Db\Adapter\AdapterInterface' not found in /var/www/vendor/laminas/laminas-db/src/Adapter/Adapter.php

I keep getting this error when I'm trying to open Album application from Laminas MVC tutorial. I use multicontainer configuration in Docker which consists of li

No main manifest attribute, in executable jar

while running my jar I receive the below error No main manifest attribute, in jar I have followed some of the solutions provided here but it did not solv

Redirect to Action not working using MVC asp.net

I have a requirement, where I validate user using Windows Authentication. Till there it works perfectly fine. But when I try to redirect to respective controlle

Invalid non-ASCII or control character in header on redirect

I'm using asp.net core 2.1 and I have a problem on redirect. My URL is like: HTTP://localhost:60695/ShowProduct/2/شال-آبی

LogicException: You must define a binary prior to conversion

snappy.php get this code 'pdf' => [ 'enabled' => true, 'binary' => env('"C:\Program Files\wkhtmltox\bin\wkhtmltopdf-amd64.exe"'), 'timeout

Codeigniter, Severity: error --> Exception: Too few arguments to function, admin dashboard shows HTTP error 500

I am faced with an error in log files This ERROR - 2022-05-13 02:47:21 --> Severity: error --> Exception: Too few arguments to function Transactions_model

Does a simple REST project in Spring Boot use the MVC principle?

I need to create a simple project that uses the Model-View-Controller principle and a MySQL database. And I want to use Spring Boot with Spring MVC and Spring D

Communicate two views with one controller in AngularJS

I'm using UI-Router for Angular and I have separated views for my app: sidebar and main. Now i need to change some class in main view after some action that doe

how to disable button during ajax request

so I have a razor form and I want to disable a button during ajax request. Also I want to be able to send only one request to controller - (disable any flood a

MVC the simplest example

I'm struggling to understand the MVC pattern. I've been working with MVC frameworks like ASP.NET MVC and Django, but project structure there is pretty much forc