tagged [model-view-controller]
Some files in "wwwroot" folder are not published in ASP.NET Core web deploy
Some files in "wwwroot" folder are not published in ASP.NET Core web deploy I am using ASP.NET Core 2.0 in Visual Studio 2017. My site works fine when I hit debug in [IIS Express](https://en.wikipedia...
- Modified
- 21 Feb at 21:21
Asp.net MVC how to populate dropdown list with numbers
Asp.net MVC how to populate dropdown list with numbers I have seen similar examples where people need to populate with a list of object but all I would like to achieve is to have the numbers 1-10 in m...
- Modified
- 15 Apr at 21:38
Migration: No DbContext was found in assembly
Migration: No DbContext was found in assembly Using VS Community 2017. I have tried to create initial migration with error message saying: > Both Entity Framework Core and Entity Framework 6 are insta...
- Modified
- 11 Oct at 03:15
Unable to open configSource file that was added as link
Unable to open configSource file that was added as link In my MVC application I use external config files to keep clean web.config. Some files are common and I added them to project as link from one l...
- Modified
- 9 Dec at 18:31
Embedded statement cannot be a declaration or labeled statement
Embedded statement cannot be a declaration or labeled statement I am trying to create a user using claim identity asp.net I get this error while creating claims identity user. ``` ApplicationUser user...
- Modified
- 14 Jul at 12:36
Get object instance from HtmlHelper
Get object instance from HtmlHelper Using the following code in an htmlhelper gives me some metadata. It even has the container type. What I want is the container instance. In the expression I want to...
- Modified
- 27 Jan at 09:52
Cannot apply indexing with [] to an expression of type 'System.Collections.Generic.ICollection<int> in mvc controller
Cannot apply indexing with [] to an expression of type 'System.Collections.Generic.ICollection in mvc controller ``` public ActionResult addstandardpackage1(ICollection SingleStay,ICollection DOUBLEST...
- Modified
- 28 Aug at 15:22
Could not install package 'Microsoft.Extensions.DependencyInjection.Abstractions 2.0.0
Could not install package 'Microsoft.Extensions.DependencyInjection.Abstractions 2.0.0 I'm attempting to use Net Core in my mvc application for security policies. Articles I've read said I need to ins...
- Modified
- 24 Aug at 22:54
ActionFilterAttribute - apply to actions of a specific controller type
ActionFilterAttribute - apply to actions of a specific controller type I'm using an ActionFilterAttribute to do custom authentication logic. The Attribute will only be used on a derived Controller cla...
- Modified
- 17 Sep at 17:6
Get properties of a Dynamic Type
Get properties of a Dynamic Type I would like to know how to get the properties of my dynamic type. This is the function to get the List, As example I get an object returned like this : [](https://i.s...
- Modified
- 12 Jan at 13:4
C# trim within the get; set;
C# trim within the get; set; I am total MVC newbie coming from 10 years of webforms. Here is the code I have inherited: How can I apply a trim function to the "set" portion of this code? Right now it ...
- Modified
- 28 Dec at 20:34
How does the MVC pattern differ, if at all, from the DAL / BLL design pattern?
How does the MVC pattern differ, if at all, from the DAL / BLL design pattern? I'm making my way through the early [Data Access Tutorials](http://www.asp.net/learn/data-access/?lang=cs) on Microsoft's...
- Modified
- 6 Nov at 09:10
Pros and cons of different MVC frameworks for .NET
Pros and cons of different MVC frameworks for .NET With all the hype around MVC (and rightly so) I've decided to give it a go myself and write my first .NET MVC web application. With a few options to ...
- Modified
- 12 Jul at 20:45
No default constructor found; nested exception is java.lang.NoSuchMethodException with Spring MVC?
No default constructor found; nested exception is java.lang.NoSuchMethodException with Spring MVC? I am working with Spring MVC controller project. Below is my Controller and I have a constructor decl...
- Modified
- 12 Aug at 19:28
How should a model be structured in MVC?
How should a model be structured in MVC? I am just getting a grasp on the MVC framework and I often wonder how much code should go in the model. I tend to have a data access class that has methods lik...
- Modified
- 23 Aug at 18:8
MVC sharing Servicestack Model (ormlite)
MVC sharing Servicestack Model (ormlite) I'm new to MVC. I come from Webforms, by the way I was also using Servicestack ormlite. I need to know if I can have an MVC project, but the Model section can ...
- Modified
- 5 Nov at 01:52
How do you turn off Razor highlighting in VS 2013?
How do you turn off Razor highlighting in VS 2013? I found a thread: [Highlighting kills my Razor syntax in Visual Studio 2010](https://stackoverflow.com/questions/13564695/highlighting-kill-my-razor-...
- Modified
- 23 May at 11:55
Migrating .net framework to .netcore 3.1 (Servicestack.Razor Views)
Migrating .net framework to .netcore 3.1 (Servicestack.Razor Views) I'm migrating a .net framework web to .netcore Having issues with moving the 'Views' folder. It seems that every razor page with `@i...
- Modified
- 23 Jul at 17:50
How to route a multiple language URL with a MVC
How to route a multiple language URL with a MVC I need multi-language URL route of existing controller. Let me explain more: I have a controller with name "Product" and View with name "Software"; ther...
- Modified
- 31 Dec at 04:44
How to cast a nullable DateTime to UTC DateTime
How to cast a nullable DateTime to UTC DateTime I'm reading back a DateTime? value from my view. Now I check to see if the `NextUpdate` DateTime? `HasValue` and if so convert that time to `UTC`. From ...
- Modified
- 2 Jun at 10:32
Can I get the name of the current controller in the view?
Can I get the name of the current controller in the view? Is there a way to figure out what the current controller is from within the view? For an example of why I would want to know this: if several ...
- Modified
- 27 Mar at 17:44
Unable to set data attribute using jQuery Data() API
Unable to set data attribute using jQuery Data() API I've got the following field on an MVC view: In a seperate js file, I want to set the `data-helptext` attribute to a string value. Here's my code:
- Modified
- 4 Nov at 10:16
Who's responsible for creating the MainViewController instance in the iPhone NavBar example
Who's responsible for creating the MainViewController instance in the iPhone NavBar example I'm exploring [the NavBar example](https://developer.apple.com/iphone/library/samplecode/NavBar/index.html) ...
- Modified
- 24 Nov at 02:15
Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported for @RequestBody MultiValueMap
Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported for @RequestBody MultiValueMap Based on the answer [for problem with x-www-form-urlencoded with Spring @Controller](https:/...
- Modified
- 26 Nov at 07:16
Display List in a View MVC
Display List in a View MVC I'm trying to display the list I made in my view but keep getting : "The model item passed into the dictionary is of type 'System.Collections.Generic.List`1[System.String]',...
- Modified
- 10 Mar at 07:23