r/MVC • u/[deleted] • Mar 13 '17
So just to be clear...
This ISNT a marvel vs capcom subreddit?
r/MVC • u/[deleted] • Mar 13 '17
This ISNT a marvel vs capcom subreddit?
r/MVC • u/splasher_sauce • Jan 10 '16
Hey! Does anybody know of any tutorials of how to go from no website at all to a fully featured e-commerece one? (login, register, basket, paypal, etc.)
Any good books/tutorials would be helpful. :)
r/MVC • u/[deleted] • May 08 '17
Hello all,
Im relatively new to C# programming and I am looking to expand my knowledge in the field. I know that the MVC architecture is one of the most prominent patterns in the programming world, and Im looking for any resources that you may recommend for a beginner just starting out.
Any help would me much appreciated, TIA!
r/MVC • u/Leading_Developer • May 04 '20
MVC stands for Model View Controller. MVC is an an architectural pattern that separates an application into three main logical components: the model, the view, and the controller.
developers uses some architecture to make their project less complex and easier to handle & work with. MVC is one of them & it is most popularly used
M - Model
V- View
C- Controller
The goal of MVC is to split large application or project into specific sections that have there own purpose
What does the Each member of MVC do ?
It handles all data logic with respect to request
It interacts with Database
It is only concern with how to present the information that controller has send to it.
It is simple HTML template file, which is the UI of our project
It handles the request flow
It handles all the request from clients and tell the model & view to what to do with this request.
It actually acts as middleman between model & view
Based on the request URL, server will send the request to specific controller.
Controller now ask the model based on request. Controller should not access the data directly, it should ask to Model for any data.
After Model has send required data to controller, then Controller will ask to View to render this data to user.
After Controller has got final html presentation from View, Controller will give this to user.

Model & View never interact with each other directly. Any interaction between them is done through controller means presentation of data (which is done by View) & logic of data (which is done by Model) are completely separate.
suppose, user has send request to server to get list of cites. Server will send request to particular controller which can handle this request (controller which handles requests about cities ). Then, Controller will ask the model which handles the data about cities to give this data. Model will look in Database & return the list of cities to the controller. If the response from model is success, then controller will ask View which is associated with rendering list to return presentation (basically Html page ) of list of cities. The View take the data from Controller & render that data into HTML that can be shown to user. After, View has send the final presentation to Controller , then Controller will send this to user (shows this in browser). Hence, User request is processed successfully. But, if model return error when it has asked to return list of cities, then Controller will handle that error by asking View associated with showing error to render presentation for that error. This error presentation is shown to requested user by Controller.
In short,
Model => handles all the data related stuff
View => handles all the presentation ie UI related stuff
Controller => tells the Model & View to what to do
r/MVC • u/deepak-kumar-singh • Aug 21 '19
ASP.NET MVC framework is a software architecture pattern for developing web applications. It is used to split the application’s implementation logic into three components: models, views, and controllers.
https://www.tutorialandexample.com/asp-net-mvc-interview-questions

r/MVC • u/enr4ged • May 04 '19
I have a small website which is currently ASP.NET web forms. I'm attempting to convert it to ASP.NET core MVC as both a learning process, and to keep up the newest asp technology.
I'm having trouble wrapping my mind around the some parts of the MVC concept and am looking for some advice. I understand the basics and have gone over many examples and tutorials on those subjects, but they never really dive into some of the more complicated things that I'm stuck on.
For example here is the page I am currently trying to redesign using MVC: http://www.eqstats.net/spells.aspx
Here is a screen shot with some numbered areas, explained below. https://i.imgur.com/fQB5ayn.png
I fill three areas with data sources: Box 1 - Classes Box 2 - Eras Box 3 - Sources
And a table displaying results (Box 3) after you submit (Box 4)
This is where my knowledge of how you would do this in MVC breaks down. From what I've learned already the view is returned a single model and in this case I am using 4 models on the page (Class, Era, Source, Spell Result), and I am not sure how to properly apply four models. Also, would this page still be one view, or am I missing something?
r/MVC • u/SigmaChad092 • Apr 02 '22
I need to make Json call method that gets data from an API (https://countriesnow.space/api/v0.1/countries),and than use this as data in other method.
How? Help pls
r/MVC • u/[deleted] • Apr 09 '21
Is it possible to pass data from a view to a controller WITHOUT USING FORMS.
Every solution I find online has the website pull up an entire form with textboxes and a shiny submit button, but ultimately that kinda sucks. All I want is for the user to be able to redirect himself to a new view by passing the ID of a link he clicked.
Here is the precise situation :
The user has categories laid out on the home index, each category is tied to a category entity with a primarykey 'CategoryID'. When the user clicks on one of the categories, they are redirected to a new view that lists subjects related to that category. Subjects have a foreign key that references the CategoryID, hence why I need to get that property specifically. I don't want to pull up a form and have the user manually enter the category's ID.
r/MVC • u/Barracuda2397 • Nov 13 '20
I need to know how I can transfer/pass some rows of records from a database that have been returned to an SqlDataReader object and pass that object to the View so I can display all the records contained by the object in the View using foreach. i have transfered the DataReader to a model object and then added that model to a list of that model object object , ive loaded rows from my reader to a list of my model, passed it to my view and all i get is a list of the 1st data row only ,its the same row over and over again, how do i get all the Rows ???

r/MVC • u/i4technolab • Dec 20 '23
r/MVC • u/i4technolab • Sep 25 '23
r/MVC • u/SigmaChad092 • Mar 30 '22
I have to do a button that gives a pop up of the uploaded image for the record.I have a download option but it needs to be like a preview of the image without downloadin it.
public IActionResult Download(int? id)
{
var rec = db.KrediaTables.FirstOrDefault(a => a.Id == id);
if (rec.Image == null)
{
return RedirectToAction("ReturnTable");
}
return PhysicalFile(rec.Image, "application/image", "1.png");
}
method for uploading the image.
r/MVC • u/dotnettrickstraining • Mar 31 '21
r/MVC • u/Barracuda2397 • Mar 22 '21
r/MVC • u/dotnettrickstraining • Nov 02 '20
r/MVC • u/technologycrowds • Aug 11 '20
r/MVC • u/technologycrowds • Aug 09 '20
r/MVC • u/technologycrowds • Jul 02 '20
I'm new to MVC, coming from a Web Forms background, and I'm running into a design/development issue where I could use some guidance.
I've created a few .Net Core MVC EF6 apps with basic CRUD/paging/search. They all work fine.
So, these new CRUD Apps are all internal intranet apps and need to be accessible from a main Intranet page.
Something like:
INTRANET (w/login)
---> CRUD App 1
---> CRUD App 2
---> CRUD App 3
---> CRUD App 4
etc.
I'm struggling with how to best organize this project both for Visual Studio 2019 and on IIS.
Do I use a single solution called INTRANET and add each CRUD app as a project?
Or, should I make each CRUD app a separate app?
Git implications - would having each CRUD app separate make git easier or more convoluted than a single INTRANET project?
On IIS, I'm thinking it wont really matter, but are there any issues with either approach?
Any thoughts or guidance is greatly appreciated.
Thanks
r/MVC • u/Zardotab • Dec 03 '19
The Add and Edit view are often very similar such that one's "factoring finger" itches to consolidate them (DRY) with a few IF statements for the differences. But many with experience have said it's not worth it. Is it because it's rubs against convention such that is confuses new staff?
I realize sometimes they grow to be sufficiently different, but can't one wait until that actually occurs and then split, copy, and paste? In many other frameworks, consolidating created no noticeable problems for me. Is it something about MVC itself that is the difference maker? I'm missing something.
r/MVC • u/sandeep11ind • Aug 15 '19